core/unicode/utf16
utf16
Constants
6MAX_RUNE
MAX_RUNE :: '\U0010ffff'SourceREPLACEMENT_CHAR
REPLACEMENT_CHAR :: '\ufffd'Source_surr1
_surr1 :: 0xd800Source_surr2
_surr2 :: 0xdc00Source_surr3
_surr3 :: 0xe000Source_surr_self
_surr_self :: 0x10000SourceProcedures
11decode
decode :: proc(d: []rune, s: []u16) -> (n: int)Sourcedecode_rune_in_string
decode_rune_in_string :: proc(s: string16) -> (r: rune, width: int)Sourcedecode_surrogate_pair
decode_surrogate_pair :: proc(r1: rune, r2: rune) -> (rune)Sourcedecode_to_utf8
decode_to_utf8 :: proc(d: []u8, s: []u16) -> (n: int)Sourceencode
encode :: proc(d: []u16, s: []rune) -> (int)Sourceencode_string
encode_string :: proc(d: []u16, s: string) -> (int)Sourceencode_surrogate_pair
encode_surrogate_pair :: proc(c: rune) -> (r1: rune, r2: rune)Sourceis_surrogate
is_surrogate :: proc(r: rune) -> (bool)Sourcerune_count_in_slice
rune_count_in_slice :: proc(s: []u16) -> (n: int)Sourcerune_count_in_string
rune_count_in_string :: proc(s: string16) -> (n: int)Sourcestring_to_runes
string_to_runes :: proc(s: string16, allocator: mem.Allocator = context.allocator) -> (runes: []rune, err: runtime.Allocator_Error)Source