TextDecoder

TextDecoder

package js-html

Available on js

The TextDecoder interface represents a decoder for a specific method, that is a specific character encoding, like utf-8, iso-8859-2, koi8, cp1261, gbk, ... A decoder takes a stream of bytes as input and emits a stream of code points. For a more scalable, non-native library, see StringView – a C-like representation of strings based on typed arrays.

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

See:

Constructor

new (label:String = "utf-8", ?options:TextDecoderOptions)

Throws:

null DOMError

Variables

read only encoding:String

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

read only fatal:Bool

Is a Boolean indicating whether the error mode is fatal.

Methods

decode (?input:EitherType<ArrayBufferView, ArrayBuffer>, ?options:TextDecodeOptions):String

Throws:

null DOMError

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

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部