Unicode strings: Difference between revisions

Line 1,015:
 
=={{header|Nim}}==
Nim strings are sequences of 8-bit bytes, so they can readily be encoded in UTF-8. TheOther than allowing \uXXXX and \u{x+} UTF-8 escape sequences in strings, the language is agnostic about their content;. allAll unicode handling is via libraries. There is a minimal unicode module that is part of the standard distribution that allows converting UTF-8 strings to and from UTF-32 (the type of a UTF-32 value is Rune), as well as performing find, append, etc. directly on strings considered as UTF-8. More advanced unicode handling is available via installable moduldesmodules from the community library.
 
[TBD ... the code below is from the editor before me and needs to be greatly expanded]
<lang nim>let c = "abcdé"
Anonymous user