Decoding of Strings as Ranges of dchar
Understand how automatic decoding of strings as ranges of dchar happens.
We'll cover the following...
Automatic decoding of strings
Being character arrays by definition, strings can also be used as ranges just by importing std.array
. However, char
and wchar
strings cannot be used as RandomAccessRange.
std.array
provides a special functionality with all types of strings. Iterating over strings becomes iterating over Unicode code points, not over UTF code units. As a result, strings appear as ranges of ...