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. The language is agnostic about their content; all 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 moduldes from the community library.
Strings are assumed to be UTF-8 in Nim.
<lang nim>let c = "abcdé"
let Δ = 12
Anonymous user