Character codes: Difference between revisions
Content deleted Content added
Updated D entry |
|||
Line 164: | Line 164: | ||
void main() { |
void main() { |
||
string test = "a"; |
string test = "a"; |
||
size_t index = 0; |
size_t index = 0; |
||
// |
// Get four-byte utf32 value for index 0 |
||
// this returns dchar, so cast it to numeric |
// this returns dchar, so cast it to numeric. |
||
writeln(cast(uint)test.decode(index)); |
|||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
}</lang> |
}</lang> |
||
{{out}} |
|||
<pre>97</pre> |
|||
=={{header|Delphi}}== |
=={{header|Delphi}}== |