NAME
src/string/encoding/ucs2.c - UCS-2 encoding
DESCRIPTION
UCS-2 encoding with the help of the ICU library.
Functions
static STRING *to_encoding
Converts the string static UINTVAL get_codepoint
Returns the codepoint in string static void set_codepoint
Sets,
in string static UINTVAL get_byte
Returns the byte in string static void set_byte
Sets,
in string static STRING *get_codepoints
Returns the codepoints in string static STRING *get_bytes
Returns the bytes in string static STRING *get_codepoints_inplace
Gets from string static STRING *get_bytes_inplace
Gets from string static void set_codepoints
Replaces in string static void set_bytes
Replaces in string 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 static UINTVAL bytes
Returns the number of bytes in string static UINTVAL ucs2_decode_and_advance
Moves the string iterator static void ucs2_encode_and_advance
With the string iterator static void ucs2_set_position
Moves the string iterator static void iter_init
Initializes for string ENCODING *Parrot_encoding_ucs2_init
Initializes the UCS-2 encoding.
src
to this particular encoding.
If dest
is provided,
it will contain the result.
Otherwise this function operates in place.
src
at position offset
.
src
at position offset
,
the codepoint codepoint
.
src
at position offset
.
src
at position offset
,
the byte byte
.
src
at position offset
and length count
.
src
at position offset
and length count
.
src
at position offset
count
codepoints and returns them in return_string
.
src
at position offset
count
bytes and returns them in return_string
.
src
at position offset
for count
codepoints with the contents of string new_codepoints
.
src
at position offset
for count
bytes with the contents of string new_bytes
.
src
.
src
.
i
to the next UCS-2 codepoint.
i
,
appends the codepoint c
and advances to the next position in the string.
i
to the position n
in the string.
src
the string iterator iter
.
SEE ALSO
src/string/encoding/fixed_8.c, src/string/encoding/utf8.c, src/string.c, include/parrot/string.h, docs/string.pod.