UTF-8 enoded strings
Type of UTF-8 encoded strings.
Invalid(error, text) Exception raised when an invalid UTF-8
encoded string is encountered.
text is the faulty text and
error is a description of the first error in
Exception raised when trying to access a character which is outside the bounds of a string.
Same as check but raises an exception in case the argument is not a valid text, otherwise returns the length of the string.
next_error str ofs returns
(ofs', count, msg) where
is the offset of the start of the first invalid sequence after
ofs (inclusive) in
count is the number of unicode
ofs' (exclusive) and
msg is an
error message. If there is no error until the end of string then
String.length str and
msg is the empty string.
escaped_char ch returns a string containg
ch or an escaped
chis a control character (code < 32)
chis the character with code 127
chis a non-ascii, non-alphabetic character
It uses the syntax
\UXXXXXX or a specific
\n, \r, ....
These functions does not check that the given offset is inside the bounds of the given string.
unsafe_next str ofs returns the offset of the next character
unsafe_prev str ofs returns the offset of the previous