Utf8

From GiderosMobile
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Supported platforms: Platform android.pngPlatform ios.pngPlatform mac.pngPlatform pc.pngPlatform html5.pngPlatform winrt.pngPlatform win32.pngPlatform linux.png
Available since: Gideros 2016.06

Description

utf8 string library.

Methods

utf8.byte returns the internal numerical codes of the characters
utf8.char returns a string from integers as characters
utf8.charpos converts UTF-8 position to byte offset
utf8.codepoint returns the codepoints (as integers) from all characters
utf8.codes returns code values over all characters in a string
utf8.escape escapes a str to UTF-8 format string
utf8.find looks for the first match of pattern in the string s
utf8.fold converts UTF-8 string s to folded case used to compare by ignore case
utf8.gmatch returns an iterator function
utf8.gsub returns a copy of s in which all (or the first n, if given) occurrences of the pattern have been replaced
utf8.insert inserts a substring to s
utf8.len returns the number of UTF-8 characters in string
utf8.lower receives a string and returns a copy of this string with all uppercase letters changed to lowercase
utf8.match looks for the first match of pattern in the string s
utf8.ncasecmp compares a and b without case
utf8.next iterates through the UTF-8 string s
utf8.offset returns the position (in bytes) where the encoding of the n-th character of s starts
utf8.remove deletes a substring in s
utf8.reverse returns a string that is the string s reversed
utf8.sub returns the substring of s that starts at i and continues until j
utf8.title converts UTF-8 string s to title case used to compare by ignore case
utf8.upper receives a string and returns a copy of this string with all lowercase letters changed to uppercase
utf8.width calculates the width of UTF-8 string s
utf8.widthindex returns the character index at given location in string s

Events

Constants

utf8.charpattern utf8 char pattern [\0-\x7F\xC2-\xF4][\x80-\xBF]*