Summary

Functions

Returns the number of bytes used by the UTF-8 character at a byte position.
lower(s)shared
Converts a string to lower case, including the non-ASCII letters in it.
lower(s)shared
Returns a part of a string, like string.sub, except that positions are counted in UTF-8 characters rather than bytes.
upper(s)shared
Converts a string to upper case, including the non-ASCII letters in it.
upper(s)shared

Functions

utf8.clen(s, i)

shared packages/utf8/lib/utf8.lua:1922

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 1 byte position of the first byte of the character

Returns

  • Number from 1 to 4

utf8.clen(s, i)

shared packages/utf8/lib/utf8.min.lua:1

No documentation available.

utf8.lower(s)

shared packages/utf8/lib/utf8.lua:2071

Converts a string to lower case, including the non-ASCII letters in it.

Parameters

  • s String

Returns

  • String

utf8.lower(s)

shared packages/utf8/lib/utf8.min.lua:1

No documentation available.

utf8.sub(s, i, j)

shared packages/utf8/lib/utf8.lua:2019

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 -1 last character, negative values count from the end of the string

Returns

  • String

utf8.sub(s, i, j)

shared packages/utf8/lib/utf8.min.lua:1

No documentation available.

utf8.upper(s)

shared packages/utf8/lib/utf8.lua:2064

Converts a string to upper case, including the non-ASCII letters in it.

Parameters

  • s String

Returns

  • String

utf8.upper(s)

shared packages/utf8/lib/utf8.min.lua:1

No documentation available.

Defined in