Am 22.10.2011 12:55, schrieb Alvaro:
El 20/10/2011 21:37, Martin Nowak escribió:
It just took me over one hour to find out the unthinkable.
foreach(c; str) will deduce c to immutable(char) and doesn't care about
unicode.
Now there is so many unicode transcoding happening in the language that
it starts to get annoying,
but the most basic string iteration doesn't support it by default?

Maybe I didn't fully get your point, but, you do know that you can do
the following, right?

string str = "Ñandú";
foreach(dchar c; str)
...

One visible Unicode character can consists of several dchars.
(This is called "Grapheme")

Cheers,
- Daniel

Reply via email to