NAME ^

src/encodings/utf16.c - UTF-16 encoding

DESCRIPTION ^

UTF-16 encoding with the help of the ICU library.

Functions ^

static STRING *to_encoding
Converts the string src to this particular encoding. If dest is provided, it will contain the result. Otherwise this function operates in place.
static UINTVAL get_codepoint
Returns the codepoint in string src at position offset.
static void set_codepoint
Sets, in string src at position offset, the codepoint codepoint.
static UINTVAL get_byte
Returns the byte in string src at position offset.
static void set_byte
Sets, in string src at position offset, the byte byte.
static STRING *get_codepoints
Returns the codepoints in string src at position offset and length count.
static STRING *get_codepoints_inplace
Gets from string src at position offset count codepoints and returns them in return_string.
static STRING *get_bytes
Returns the bytes in string src at position offset and length count.
static STRING *get_bytes_inplace
Gets from string src at position offset count bytes and returns them in return_string.
static void set_codepoints
Replaces in string src at position offset for count codepoints with the contents of string new_codepoints.
static void set_bytes
Replaces in string src at position offset for count bytes with the contents of string new_bytes.
static void become_encoding
Unconditionally makes the string be in this encoding, if that's valid
static UINTVAL codepoints
Returns the number of codepoints in string src.
static UINTVAL bytes
Returns the number of bytes in string src.
static UINTVAL utf16_decode_and_advance
Moves the string iterator i to the next UTF-16 codepoint.
static void utf16_encode_and_advance
With the string iterator i, appends the codepoint c and advances to the next position in the string.
static void utf16_set_position
Moves the string iterator i to the position n in the string.
static void iter_init
Initializes for string src the string iterator iter.
ENCODING *Parrot_encoding_utf16_init
Initializes the UTF-16 encoding.

SEE ALSO ^

src/encodings/fixed_8.c, src/encodings/utf8.c, src/string.c, include/parrot/string.h, docs/string.pod.


parrot