Difference between revisions of "string.uchar"

From Inspired-Lua Wiki
Jump to navigation Jump to search
(Created page with "'''string.uchar''' is a function that is part of the Extended Standard Library. Unicode characters may be included in strings by encodin...")
 
Line 19: Line 19:
 
== Example  ==
 
== Example  ==
 
<syntaxhighlight>
 
<syntaxhighlight>
-- special characters
 
 
a_acute = string.uchar(225)
 
a_acute = string.uchar(225)
a_circ  = string.uchar(226)
+
a_circ  = string.uchar(226) -- â
a_tilde = string.uchar(227)
+
a_tilde = string.uchar(227) -- ã
 
a_diaer = string.uchar(228)
 
a_diaer = string.uchar(228)
 
a_ring  = string.uchar(229)
 
a_ring  = string.uchar(229)
e_acute = string.uchar(233)
+
e_acute = string.uchar(233) -- é
o_acute = string.uchar(243)
+
o_acute = string.uchar(243)  
o_circ  = string.uchar(244)
+
o_circ  = string.uchar(244) -- ô
 
alpha = string.uchar(945)
 
alpha = string.uchar(945)
 
beta= string.uchar(946)
 
beta= string.uchar(946)

Revision as of 17:07, 19 December 2011

string.uchar is a function that is part of the Extended Standard Library.

Unicode characters may be included in strings by encoding them in UTF-8. This routine converts one or more Unicode character numbers into a UTF-8 string.

This has been introduced in TI-Nspire OS 3.0 (Changes).


Syntax

functionName(ChNum[, ...])

Parameter Type Description
ChNum
number The Unicode number of the character to display
...
numbers The Unicode numbers of the characters to display (comma-seperated)

Example

a_acute = string.uchar(225)
a_circ  = string.uchar(226) -- â
a_tilde = string.uchar(227) -- ã
a_diaer = string.uchar(228)
a_ring  = string.uchar(229)
e_acute = string.uchar(233) -- é
o_acute = string.uchar(243) 
o_circ  = string.uchar(244) -- ô
alpha = string.uchar(945)
beta= string.uchar(946)
sup_plus = string.uchar(8314)
sup_minus = string.uchar(8315)
right_arrow = string.uchar(8594)