本文整理汇总了TypeScript中iconv.Iconv.end方法的典型用法代码示例。如果您正苦于以下问题:TypeScript Iconv.end方法的具体用法?TypeScript Iconv.end怎么用?TypeScript Iconv.end使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类iconv.Iconv
的用法示例。
在下文中一共展示了Iconv.end方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: Iconv
///<reference path="./iconv.d.ts" />
import {Iconv} from "iconv";
import {Writable} from "stream";
const iconv: Iconv.Iconv = new Iconv("utf-8", "cp932");
const iconvFromFunction: Iconv.Iconv = Iconv("utf-8", "cp932");
iconv.writable = true;
let buffer: Buffer;
buffer = iconv.convert("hoge");
buffer = iconv.convert("hoge", "utf-8");
buffer = iconv.convert(new Buffer("hoge"), "utf-8");
let result: boolean;
result = iconv.write("hoge");
result = iconv.write("hoge", "utf-8");
result = iconv.write(new Buffer("hoge"), "utf-8");
iconv.end();
iconv.end("hoge");
iconv.end("hoge", "utf-8");
iconv.end(new Buffer("hoge"), "utf-8");
const st: Writable = iconv.pipe(new Writable, {end: true});