utf8 library
Part of UTF-8
Summary
Functions
clen(s, i)shared
Returns the number of bytes used by the UTF-8 character at a byte position.
clen(s, i)shared
lower(s)shared
Converts a string to lower case, including the non-ASCII letters in it.
lower(s)shared
sub(s, i, j)shared
Returns a part of a string, like string.sub, except that positions are counted in UTF-8 characters rather than bytes.
sub(s, i, j)shared
upper(s)shared
Converts a string to upper case, including the non-ASCII letters in it.
upper(s)shared
Functions
Returns the number of bytes used by the UTF-8 character at a byte position. Throws an error if the character is not valid UTF-8.
Parameters
- s String
- i Number optional, defaults to
1byte position of the first byte of the character
Returns
- Number from 1 to 4
No documentation available.
Converts a string to lower case, including the non-ASCII letters in it.
Parameters
- s String
Returns
- String
No documentation available.
Returns a part of a string, like string.sub, except that positions are counted in UTF-8 characters rather than bytes.
Parameters
- s String
- i Number first character, negative values count from the end of the string
- j Number optional, defaults to
-1last character, negative values count from the end of the string
Returns
- String
No documentation available.
Converts a string to upper case, including the non-ASCII letters in it.
Parameters
- s String
Returns
- String
No documentation available.