Difference between revisions of "Utf8.escape"
From GiderosMobile
 (Created page with "__NOTOC__ '''Available since:''' Gideros 2016.06<br/> === Description === Escape a str to UTF-8 format string. It support several escape format: %ddd - which ddd is a decimal...")  | 
				|||
| Line 5: | Line 5: | ||
%ddd - which ddd is a decimal number at any length: change Unicode code point to UTF-8 format. %{ddd} - same as %nnn but has bracket around. %uddd - same as %ddd, u stands Unicode %u{ddd} - same as %{ddd} %xhhh - hexadigit version of %ddd %x{hhh} same as %xhhh. %? - '?' stands for any other character: escape this character.  | %ddd - which ddd is a decimal number at any length: change Unicode code point to UTF-8 format. %{ddd} - same as %nnn but has bracket around. %uddd - same as %ddd, u stands Unicode %u{ddd} - same as %{ddd} %xhhh - hexadigit version of %ddd %x{hhh} same as %xhhh. %? - '?' stands for any other character: escape this character.  | ||
<source lang="lua">  | <source lang="lua">  | ||
| − | (string)  | + | (string) = utf8.escape(s)  | 
</source>  | </source>  | ||
| − | '''s  | + | '''s''': (string)  ''''''<br/>  | 
'''Returns''' (string) escaped string<br/>  | '''Returns''' (string) escaped string<br/>  | ||
Revision as of 10:17, 23 August 2018
Available since: Gideros 2016.06
Description
Escape a str to UTF-8 format string. It support several escape format: %ddd - which ddd is a decimal number at any length: change Unicode code point to UTF-8 format. %{ddd} - same as %nnn but has bracket around. %uddd - same as %ddd, u stands Unicode %u{ddd} - same as %{ddd} %xhhh - hexadigit version of %ddd %x{hhh} same as %xhhh. %? - '?' stands for any other character: escape this character.
(string) = utf8.escape(s)
's: (string)  '
Returns (string) escaped string