Module: stdgo.unicode.utf16
Overview
Index
Constants
import stdgo.unicode.utf16.Utf16
final maxRune:Int = stdgo._internal.unicode.utf16.Utf16_maxRune.maxRune
final replacementChar:Int = stdgo._internal.unicode.utf16.Utf16_replacementChar.replacementChar
Classes
import stdgo.unicode.utf16.*
class Utf16
Package utf16 implements encoding and decoding of UTF-16 sequences.
Utf16 function appendRune
function appendRune(_a:Array<UInt>, _r:Int):Array<UInt>
AppendRune appends the UTF-16 encoding of the Unicode code point r
to the end of p and returns the extended buffer. If the rune is not
a valid Unicode code point, it appends the encoding of U+FFFD.
Utf16 function decode
function decode(_s:Array<UInt>):Array<Int>
Decode returns the Unicode code point sequence represented
by the UTF-16 encoding s.
Utf16 function decodeRune
function decodeRune(_r1:Int, _r2:Int):Int
DecodeRune returns the UTF-16 decoding of a surrogate pair.
If the pair is not a valid UTF-16 surrogate pair, DecodeRune returns
the Unicode replacement code point U+FFFD.
Utf16 function encode
function encode(_s:Array<Int>):Array<UInt>
Encode returns the UTF-16 encoding of the Unicode code point sequence s.
Utf16 function encodeRune
function encodeRune(_r:Int):stdgo.Tuple<Int, Int>
EncodeRune returns the UTF-16 surrogate pair r1, r2 for the given rune.
If the rune is not a valid Unicode code point or does not need encoding,
EncodeRune returns U+FFFD, U+FFFD.
Utf16 function isSurrogate
function isSurrogate(_r:Int):Bool
IsSurrogate reports whether the specified Unicode code point
can appear in a surrogate pair.