User Tools

Site Tools


syntax:functions:code

This is an old revision of the document!


Code(text)

Category: Text function


Description

This function returns the UTF-8 code (from 0 to 2047) of the first character of text.


Arguments

ArgumentTypeDescription
textTextA text string from which the UTF-8 value of the first character is returned.

Return value type: Number


Remarks

Attempting to get the code of a character with UTF-8 code greater than 2047 will result in an "#Exotic character" error.


Examples

code('Z') = 90
code(' ') = 32  //Space character
code('ABC') = 65  //The ASCII code for the first character, 'A'


See also

syntax/functions/code.1627856621.txt.gz · Last modified: 2021/08/01 18:23 by craigt

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki