Difference between revisions of "Utf8"

From GiderosMobile
Line 9: Line 9:
 
| style="width: 50%; vertical-align:top;"|
 
| style="width: 50%; vertical-align:top;"|
 
=== <translate>Methods</translate> ===
 
=== <translate>Methods</translate> ===
[[Special:MyLanguage/utf8.byte|utf8.byte]] ''<translate>Returns the internal numerical codes of the characters</translate>''<br/><!-- GIDEROSMTD:utf8.byte -->
+
[[Special:MyLanguage/utf8.byte|utf8.byte]] ''<translate>Returns the internal numerical codes of the characters</translate>''<br/><!-- GIDEROSMTD:utf8.byte(s,i,j) Returns the internal numerical codes of the characters -->
[[Special:MyLanguage/utf8.char|utf8.char]] ''<translate>Returns a string from integers as characters</translate>''<br/><!-- GIDEROSMTD:utf8.char -->
+
[[Special:MyLanguage/utf8.char|utf8.char]] ''<translate>Returns a string from integers as characters</translate>''<br/><!-- GIDEROSMTD:utf8.char(code1,code2,codeN) Returns a string from integers as characters -->
[[Special:MyLanguage/utf8.charpos|utf8.charpos]] ''<translate>convert UTF-8 position to byte offset</translate>''<br/><!-- GIDEROSMTD:utf8.charpos -->
+
[[Special:MyLanguage/utf8.charpos|utf8.charpos]] ''<translate>convert UTF-8 position to byte offset</translate>''<br/><!-- GIDEROSMTD:utf8.charpos(s,charpos,offset) convert UTF-8 position to byte offset -->
[[Special:MyLanguage/utf8.codepoint|utf8.codepoint]] ''<translate>Returns the codepoints (as integers) from all characters</translate>''<br/><!-- GIDEROSMTD:utf8.codepoint -->
+
[[Special:MyLanguage/utf8.codepoint|utf8.codepoint]] ''<translate>Returns the codepoints (as integers) from all characters</translate>''<br/><!-- GIDEROSMTD:utf8.codepoint(s,i,j) Returns the codepoints (as integers) from all characters -->
[[Special:MyLanguage/utf8.codes|utf8.codes]] ''<translate>Returns values so that the construction</translate>''<br/><!-- GIDEROSMTD:utf8.codes -->
+
[[Special:MyLanguage/utf8.codes|utf8.codes]] ''<translate>Returns values so that the construction</translate>''<br/><!-- GIDEROSMTD:utf8.codes(s) Returns values so that the construction -->
[[Special:MyLanguage/utf8.escape|utf8.escape]] ''<translate>Escape a str to UTF-8 format string</translate>''<br/><!-- GIDEROSMTD:utf8.escape -->
+
[[Special:MyLanguage/utf8.escape|utf8.escape]] ''<translate>Escape a str to UTF-8 format string</translate>''<br/><!-- GIDEROSMTD:utf8.escape(s) Escape a str to UTF-8 format string -->
[[Special:MyLanguage/utf8.find|utf8.find]] ''<translate>Looks for the first match of pattern in the string s</translate>''<br/><!-- GIDEROSMTD:utf8.find -->
+
[[Special:MyLanguage/utf8.find|utf8.find]] ''<translate>Looks for the first match of pattern in the string s</translate>''<br/><!-- GIDEROSMTD:utf8.find(s,pattern,init,plain) Looks for the first match of pattern in the string s -->
[[Special:MyLanguage/utf8.fold|utf8.fold]] ''<translate>convert UTF-8 string s to folded case used to compare by ignore case</translate>''<br/><!-- GIDEROSMTD:utf8.fold -->
+
[[Special:MyLanguage/utf8.fold|utf8.fold]] ''<translate>convert UTF-8 string s to folded case used to compare by ignore case</translate>''<br/><!-- GIDEROSMTD:utf8.fold(s) convert UTF-8 string s to folded case used to compare by ignore case -->
[[Special:MyLanguage/utf8.gmatch|utf8.gmatch]] ''<translate>Returns an iterator function</translate>''<br/><!-- GIDEROSMTD:utf8.gmatch -->
+
[[Special:MyLanguage/utf8.gmatch|utf8.gmatch]] ''<translate>Returns an iterator function</translate>''<br/><!-- GIDEROSMTD:utf8.gmatch(s,pattern) Returns an iterator function -->
[[Special:MyLanguage/utf8.gsub|utf8.gsub]] ''<translate>Returns a copy of s in which all (or the first n, if given) occurrences of the pattern have been replaced</translate>''<br/><!-- GIDEROSMTD:utf8.gsub -->
+
[[Special:MyLanguage/utf8.gsub|utf8.gsub]] ''<translate>Returns a copy of s in which all (or the first n, if given) occurrences of the pattern have been replaced</translate>''<br/><!-- GIDEROSMTD:utf8.gsub(s,pattern,repl,n) Returns a copy of s in which all (or the first n, if given) occurrences of the pattern have been replaced -->
[[Special:MyLanguage/utf8.insert|utf8.insert]] ''<translate>Insert a substring to s</translate>''<br/><!-- GIDEROSMTD:utf8.insert -->
+
[[Special:MyLanguage/utf8.insert|utf8.insert]] ''<translate>Insert a substring to s</translate>''<br/><!-- GIDEROSMTD:utf8.insert(s,idx,substring) Insert a substring to s -->
[[Special:MyLanguage/utf8.len|utf8.len]] ''<translate>Returns the number of UTF-8 characters in string</translate>''<br/><!-- GIDEROSMTD:utf8.len -->
+
[[Special:MyLanguage/utf8.len|utf8.len]] ''<translate>Returns the number of UTF-8 characters in string</translate>''<br/><!-- GIDEROSMTD:utf8.len(s,i,j) Returns the number of UTF-8 characters in string -->
[[Special:MyLanguage/utf8.lower|utf8.lower]] ''<translate>Receives a string and returns a copy of this string with all uppercase letters changed to lowercase</translate>''<br/><!-- GIDEROSMTD:utf8.lower -->
+
[[Special:MyLanguage/utf8.lower|utf8.lower]] ''<translate>Receives a string and returns a copy of this string with all uppercase letters changed to lowercase</translate>''<br/><!-- GIDEROSMTD:utf8.lower(s) Receives a string and returns a copy of this string with all uppercase letters changed to lowercase -->
[[Special:MyLanguage/utf8.match|utf8.match]] ''<translate>Looks for the first match of pattern in the string s</translate>''<br/><!-- GIDEROSMTD:utf8.match -->
+
[[Special:MyLanguage/utf8.match|utf8.match]] ''<translate>Looks for the first match of pattern in the string s</translate>''<br/><!-- GIDEROSMTD:utf8.match(s,pattern,init) Looks for the first match of pattern in the string s -->
[[Special:MyLanguage/utf8.ncasecmp|utf8.ncasecmp]] ''<translate>Compare a and b without case</translate>''<br/><!-- GIDEROSMTD:utf8.ncasecmp -->
+
[[Special:MyLanguage/utf8.ncasecmp|utf8.ncasecmp]] ''<translate>Compare a and b without case</translate>''<br/><!-- GIDEROSMTD:utf8.ncasecmp(a,b) Compare a and b without case -->
[[Special:MyLanguage/utf8.next|utf8.next]] ''<translate>Iterate though the UTF-8 string s</translate>''<br/><!-- GIDEROSMTD:utf8.next -->
+
[[Special:MyLanguage/utf8.next|utf8.next]] ''<translate>Iterate though the UTF-8 string s</translate>''<br/><!-- GIDEROSMTD:utf8.next(s,charpos,offset) Iterate though the UTF-8 string s -->
[[Special:MyLanguage/utf8.offset|utf8.offset]] ''<translate>Returns the position (in bytes) where the encoding of the n-th character of s</translate>''<br/><!-- GIDEROSMTD:utf8.offset -->
+
[[Special:MyLanguage/utf8.offset|utf8.offset]] ''<translate>Returns the position (in bytes) where the encoding of the n-th character of s</translate>''<br/><!-- GIDEROSMTD:utf8.offset(s,n,i) Returns the position (in bytes) where the encoding of the n-th character of s -->
[[Special:MyLanguage/utf8.remove|utf8.remove]] ''<translate>Delete a substring in s</translate>''<br/><!-- GIDEROSMTD:utf8.remove -->
+
[[Special:MyLanguage/utf8.remove|utf8.remove]] ''<translate>Delete a substring in s</translate>''<br/><!-- GIDEROSMTD:utf8.remove(s,start,stop) Delete a substring in s -->
[[Special:MyLanguage/utf8.reverse|utf8.reverse]] ''<translate>Returns a string that is the string s reversed.</translate>''<br/><!-- GIDEROSMTD:utf8.reverse -->
+
[[Special:MyLanguage/utf8.reverse|utf8.reverse]] ''<translate>Returns a string that is the string s reversed.</translate>''<br/><!-- GIDEROSMTD:utf8.reverse(s) Returns a string that is the string s reversed. -->
[[Special:MyLanguage/utf8.sub|utf8.sub]] ''<translate>Returns the substring of s that starts at i and continues until j</translate>''<br/><!-- GIDEROSMTD:utf8.sub -->
+
[[Special:MyLanguage/utf8.sub|utf8.sub]] ''<translate>Returns the substring of s that starts at i and continues until j</translate>''<br/><!-- GIDEROSMTD:utf8.sub(s,i,j) Returns the substring of s that starts at i and continues until j -->
[[Special:MyLanguage/utf8.title|utf8.title]] ''<translate>Convert UTF-8 string s to title case used to compare by ignore case</translate>''<br/><!-- GIDEROSMTD:utf8.title -->
+
[[Special:MyLanguage/utf8.title|utf8.title]] ''<translate>Convert UTF-8 string s to title case used to compare by ignore case</translate>''<br/><!-- GIDEROSMTD:utf8.title(s) Convert UTF-8 string s to title case used to compare by ignore case -->
[[Special:MyLanguage/utf8.upper|utf8.upper]] ''<translate>Receives a string and returns a copy of this string with all lowercase letters changed to uppercase. </translate>''<br/><!-- GIDEROSMTD:utf8.upper -->
+
[[Special:MyLanguage/utf8.upper|utf8.upper]] ''<translate>Receives a string and returns a copy of this string with all lowercase letters changed to uppercase. </translate>''<br/><!-- GIDEROSMTD:utf8.upper(s) Receives a string and returns a copy of this string with all lowercase letters changed to uppercase.  -->
[[Special:MyLanguage/utf8.width|utf8.width]] ''<translate>calculate the width of UTF-8 string s</translate>''<br/><!-- GIDEROSMTD:utf8.width -->
+
[[Special:MyLanguage/utf8.width|utf8.width]] ''<translate>calculate the width of UTF-8 string s</translate>''<br/><!-- GIDEROSMTD:utf8.width(s,ambi_is_double,default_width) calculate the width of UTF-8 string s -->
[[Special:MyLanguage/utf8.widthindex|utf8.widthindex]] ''<translate>Return the character index at given location in string s.</translate>''<br/><!-- GIDEROSMTD:utf8.widthindex -->
+
[[Special:MyLanguage/utf8.widthindex|utf8.widthindex]] ''<translate>Return the character index at given location in string s.</translate>''<br/><!-- GIDEROSMTD:utf8.widthindex(s,location,ambi_is_double,default_width) Return the character index at given location in string s. -->
 
| style="width: 50%; vertical-align:top;"|
 
| style="width: 50%; vertical-align:top;"|
 
=== <translate>Events</translate> ===
 
=== <translate>Events</translate> ===
 
=== <translate>Constants</translate> ===
 
=== <translate>Constants</translate> ===
[[Special:MyLanguage/utf8.charpattern|utf8.charpattern]]<br/><!-- GIDEROSCST:utf8.charpattern -->
+
[[Special:MyLanguage/utf8.charpattern|utf8.charpattern]]<br/><!-- GIDEROSCST:utf8.charpattern [\0-\x7F\xC2-\xF4][\x80-\xBF]*-->
 
|}
 
|}

Revision as of 16:33, 13 September 2018


Supported platforms: Platform android.pngPlatform ios.pngPlatform mac.pngPlatform pc.pngPlatform html5.pngPlatform winrt.pngPlatform win32.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 convert UTF-8 position to byte offset
utf8.codepoint Returns the codepoints (as integers) from all characters
utf8.codes Returns values so that the construction
utf8.escape Escape a str to UTF-8 format string
utf8.find Looks for the first match of pattern in the string s
utf8.fold convert 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 Insert 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 Compare a and b without case
utf8.next Iterate though the UTF-8 string s
utf8.offset Returns the position (in bytes) where the encoding of the n-th character of s
utf8.remove Delete 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 Convert 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 calculate the width of UTF-8 string s
utf8.widthindex Return the character index at given location in string s.

Events

Constants

utf8.charpattern