NAME
src/string/encoding/utf8.c - UTF-8 encoding
DESCRIPTION
UTF-8 (http://www.utf-8.com/).
Functions
static UINTVAL utf8_characters
Returns the number of characters in the static UINTVAL utf8_decode
Returns the integer for the UTF-8 character found at static void *utf8_encode
Returns the UTF-8 encoding of integer static const void *utf8_skip_forward
Moves static const void *utf8_skip_backward
Moves
byte_len
bytes from *ptr
.
*ptr
.
c
.
ptr
n
characters forward.
ptr
n
characters back.Iterator Functions
static UINTVAL utf8_decode_and_advance
The UTF-8 implementation of the string iterator's static void utf8_encode_and_advance
The UTF-8 implementation of the string iterator's static void utf8_set_position
The UTF-8 implementation of the string iterator's 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 void iter_init
Initializes for string ENCODING *Parrot_encoding_utf8_init
Initializes the UTF-8 encoding.
get_and_advance
function.
set_and_advance
function.
set_position
function.
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
.
src
the string iterator iter
.
SEE ALSO
src/string/encoding/fixed_8.c, src/string.c, include/parrot/string.h, docs/string.pod.