Char to int and back
No edit summary
No edit summary
 
(6 intermediate revisions by 2 users not shown)
Line 1: Line 1:
Convert a number to its corresponding character
<message>Write the content here to display this box</message>
Convert a number to its corresponding character:


Char.ConvertFromUtf32( 65 )  -- returns 'A'
<code><span class="col-black">Char.ConvertFromUtf32( 65 )</span></code> -- returns 'A'


Convert a character to its corresponding Integer value
Convert a character to its corresponding Integer value:


Char.ConvertToUtf32('AB',0) -- returns 65
<code><span class="col-black">Char.ConvertToUtf32('AB',0)</span></code> -- returns 65
 
<code><span class="col-black">Char.ConvertToUtf32('AB',1)</span></code> -- returns 66


Char.ConvertToUtf32('AB',1) -- returns 66
[[Category:OCL]]
[[Category:OCL]]
[[Category:Data types]]
[[Category:Data types]]
{{Edited|July|12|2024}}

Latest revision as of 05:15, 20 June 2024

Convert a number to its corresponding character:

Char.ConvertFromUtf32( 65 ) -- returns 'A'

Convert a character to its corresponding Integer value:

Char.ConvertToUtf32('AB',0) -- returns 65

Char.ConvertToUtf32('AB',1) -- returns 66

This page was edited 92 days ago on 06/20/2024. What links here