On Tuesday, 14 January 2014 at 01:12:40 UTC, bearophile wrote:
TheFlyingFiddle:

But for backwards compatibility reasons in this code:

foreach (c; "somestring")

c is a char, not a dchar. You have to type it explicitly to handle the UTF safely:

foreach (dchar c; "somestring")

This is why i was confused really since the normal foreach is char it's weird that string.front is not a char. But if foreach being a char is only the way it is for legacy reasons it all makes sense.

Reply via email to