User Tools

Site Tools


syntax:functions:code

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
syntax:functions:code [2019/12/06 06:35] dmitrysyntax:functions:code [2021/08/01 18:23] craigt
Line 1: Line 1:
-=====Code(text)=====+====== Code(text) =====
 +Category:  Text function
  
-Returns the UTF-8 code (from 0 to 2047) of the first character of the given text string+\\  
 +=====Description===== 
 +This function returns the UTF-8 code (from 0 to 2047) of the first character of //text//.
  
-Attempting to get the code of a character with UTF-8 code greater than 2047 will result in error "#Exotic character".+\\  
 +=====Arguments===== 
 +^Argument^Type^Description^ 
 +|text|Text|A text string from which the UTF-8 value of the first character is returned.|
  
-Example+**Return value type:** Number 
-^ Expression ^ Result ^ + 
-code("ABC")   65|+\\  
 +=====Remarks===== 
 +Attempting to get the code of a character with UTF-8 code greater than 2047 will result in an "#Exotic charactererror. 
 + 
 +\\  
 +=====Examples===== 
 + 
 +  code('Z'= 90 
 +  code(' ') = 32  //Space character 
 +  code('ABC') = 65  //The ASCII code for the first character, 'A' 
 + 
 +\\  
 +===== See also ===== 
 +  * [[syntax:functions:char|Char(char_code)]]
syntax/functions/code.txt · Last modified: 2021/08/14 21:56 by craigt

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki