TextEncoder

TextEncoder

package js-html

Available on js

TextEncoder takes a stream of code points as input and emits a stream of bytes. For a more scalable, non-native library, see StringView – a C-like representation of strings based on typed arrays.

Documentation TextEncoder by Mozilla Contributors, licensed under CC-BY-SA 2.5.

See:

Constructor

new (utfLabel:String = "utf-8")

Throws:

null DOMError

Variables

read only encoding:String

Is a DOMString containing the name of the encoder, that is a string describing the method the TextEncoder will use.

Methods

encode (input:String = ""):Uint8Array

Returns a Uint8Array containing utf-8 encoded text.

© 2005–2016 Haxe Foundation
Licensed under a MIT license.
http://api.haxe.org/js/html/TextEncoder.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部