Utf8.escape

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.

Available since: Gideros 2016.06
Class: utf8

Description

Escapes a str to UTF-8 format string.

(string) = utf8.escape(s)

It supports several escape format:

  • %ddd - which ddd is a decimal number at any length: change Unicode code point to UTF-8 format
  • %{ddd} - same as %ddd 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

Parameters

s: (string)

Return values

Returns (string) escaped string