UTF-8 encoded Unicode strings. The type is normal string.
UTF-8 encoded Unicode strings. The type is normal string.
validate s
successes if s is valid UTF-8, otherwise raises Malformed_code.
Other functions assume strings are valid UTF-8, so it is prudent
to test their validity for strings from untrusted origins.
Positions in the string represented by the number of bytes from the head.
The location of the first character is 0
next s i
returns the position of the head of the Unicode character
located immediately after i
.
If i
is inside of s
, the function always successes.
If i
is inside of s
and there is no Unicode character after i
,
the position outside s
is returned.
If i
is not inside of s
, the behaviour is unspecified.
prev s i
returns the position of the head of the Unicode character
located immediately before i
.
If i
is inside of s
, the function always successes.
If i
is inside of s
and there is no Unicode character before i
,
the position outside s
is returned.
If i
is not inside of s
, the behaviour is unspecified.