Difference between revisions of "Utf8"

From GiderosMobile
 
(14 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
'''Supported platforms:''' <br/>
+
<!-- GIDEROSOBJ:utf8 -->
 +
'''Supported platforms:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]][[File:Platform html5.png]][[File:Platform winrt.png]][[File:Platform win32.png]][[File:Platform linux.png]]<br/>
 
'''Available since:''' Gideros 2016.06<br/>
 
'''Available since:''' Gideros 2016.06<br/>
 +
 
=== Description ===
 
=== Description ===
utf8 string library
+
utf8 string library.
 
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
{|-
 
{|-
| style="width: 50%;"|
+
| style="width: 50%; vertical-align:top;"|
 
=== Methods ===
 
=== Methods ===
[[utf8.byte]] - Returns the internal numerical codes of the characters<br/>
+
[[utf8.byte]] ''returns the internal numerical codes of the characters''<br/><!--GIDEROSMTD:utf8.byte(s,i,j) returns the internal numerical codes of the characters-->
[[utf8.char]] - Returns a string from integers as characters<br/>
+
[[utf8.char]] ''returns a string from integers as characters''<br/><!--GIDEROSMTD:utf8.char(code1,code2,codeN) returns a string from integers as characters-->
[[utf8.charpos]] - convert UTF-8 position to byte offset<br/>
+
[[utf8.charpos]] ''converts UTF-8 position to byte offset''<br/><!--GIDEROSMTD:utf8.charpos(s,charpos,offset) converts UTF-8 position to byte offset-->
[[utf8.codepoint]] - Returns the codepoints (as integers) from all characters<br/>
+
[[utf8.codepoint]] ''returns the codepoints (as integers) from all characters''<br/><!--GIDEROSMTD:utf8.codepoint(s,i,j) returns the codepoints (as integers) from all characters-->
[[utf8.codes]] - Returns values so that the construction<br/>
+
[[utf8.codes]] ''returns code values over all characters in a string''<br/><!--GIDEROSMTD:utf8.codes(s) returns code values over all characters in a string-->
[[utf8.escape]] - Escape a str to UTF-8 format string<br/>
+
[[utf8.escape]] ''escapes a str to UTF-8 format string''<br/><!--GIDEROSMTD:utf8.escape(s) escapes a str to UTF-8 format string-->
[[utf8.find]] - Looks for the first match of pattern in the string s<br/>
+
[[utf8.find]] ''looks for the first match of pattern in the string s''<br/><!--GIDEROSMTD:utf8.find(s,pattern,init,plain) 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<br/>
+
[[utf8.fold]] ''converts UTF-8 string s to folded case used to compare by ignore case''<br/><!--GIDEROSMTD:utf8.fold(s) converts UTF-8 string s to folded case used to compare by ignore case-->
[[utf8.gmatch]] - Returns an iterator function<br/>
+
[[utf8.gmatch]] ''returns an iterator function''<br/><!--GIDEROSMTD:utf8.gmatch(s,pattern) 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<br/>
+
[[utf8.gsub]] ''returns a copy of s in which all (or the first n, if given) occurrences of the pattern have been replaced''<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-->
[[utf8.insert]] - Insert a substring to s<br/>
+
[[utf8.insert]] ''inserts a substring to s''<br/><!--GIDEROSMTD:utf8.insert(s,idx,substring) inserts a substring to s-->
[[utf8.len]] - Returns the number of UTF-8 characters in string<br/>
+
[[utf8.len]] ''returns the number of UTF-8 characters in string''<br/><!--GIDEROSMTD:utf8.len(s,i,j) 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<br/>
+
[[utf8.lower]] ''receives a string and returns a copy of this string with all uppercase letters changed to lowercase''<br/><!--GIDEROSMTD:utf8.lower(s) 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<br/>
+
[[utf8.match]] ''looks for the first match of pattern in the string s''<br/><!--GIDEROSMTD:utf8.match(s,pattern,init) looks for the first match of pattern in the string s-->
[[utf8.ncasecmp]] - Compare a and b without case<br/>
+
[[utf8.ncasecmp]] ''compares a and b without case''<br/><!--GIDEROSMTD:utf8.ncasecmp(a,b) compares a and b without case-->
[[utf8.next]] - Iterate though the UTF-8 string s<br/>
+
[[utf8.next]] ''iterates through the UTF-8 string s''<br/><!--GIDEROSMTD:utf8.next(s,charpos,offset) iterates through the UTF-8 string s-->
[[utf8.offset]] - Returns the position (in bytes) where the encoding of the n-th character of s<br/>
+
[[utf8.offset]] ''returns the position (in bytes) where the encoding of the n-th character of s starts''<br/><!--GIDEROSMTD:utf8.offset(s,n,i) returns the position (in bytes) where the encoding of the n-th character of s starts-->
[[utf8.remove]] - Delete a substring in s<br/>
+
[[utf8.remove]] ''deletes a substring in s''<br/><!--GIDEROSMTD:utf8.remove(s,start,stop) deletes a substring in s-->
[[utf8.reverse]] - Returns a string that is the string s reversed.<br/>
+
[[utf8.reverse]] ''returns a string that is the string s reversed''<br/><!--GIDEROSMTD:utf8.reverse(s) returns a string that is the string s reversed-->
[[utf8.sub]] - Returns the substring of s that starts at i and continues until j<br/>
+
[[utf8.sub]] ''returns the substring of s that starts at i and continues until j''<br/><!--GIDEROSMTD:utf8.sub(s,i,j) 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<br/>
+
[[utf8.title]] ''converts UTF-8 string s to title case used to compare by ignore case''<br/><!--GIDEROSMTD:utf8.title(s) 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. <br/>
+
[[utf8.upper]] ''receives a string and returns a copy of this string with all lowercase letters changed to uppercase''<br/><!--GIDEROSMTD:utf8.upper(s) 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<br/>
+
[[utf8.width]] ''calculates the width of UTF-8 string s''<br/><!--GIDEROSMTD:utf8.width(s,ambi_is_double,default_width) calculates the width of UTF-8 string s-->
[[utf8.widthindex]] - Return the character index at given location in string s.<br/>
+
[[utf8.widthindex]] ''returns the character index at given location in string s''<br/><!--GIDEROSMTD:utf8.widthindex(s,location,ambi_is_double,default_width) returns the character index at given location in string s-->
| style="width: 50%;"|
+
 
 +
| style="width: 50%; vertical-align:top;"|
 
=== Events ===
 
=== Events ===
 
=== Constants ===
 
=== Constants ===
[[utf8.charpattern]]
+
[[utf8.charpattern]] ''utf8 char pattern [\0-\x7F\xC2-\xF4][\x80-\xBF]*''<br/><!--GIDEROSCST:utf8.charpattern [\0-\x7F\xC2-\xF4][\x80-\xBF]*-->
 
|}
 
|}
 +
 +
{{GIDEROS IMPORTANT LINKS}}

Latest revision as of 21:24, 1 December 2023

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]*