toString issue
Hasan Aljudy
hasan.aljudy at gmail.com
Mon Oct 2 09:18:40 PDT 2006
Oskar Linde wrote:
> Hasan Aljudy wrote:
>> Derek Parnell wrote:
>>> foreach(int i, dchar c; text)
>>> {
>>> bool isLetter = isUniAlpha( c );
>>> ...
>>> }
>>>
>>>
>>
>> I know, but that's still a work-around. What if you need to iterate
>> back and forth? You're gonna need to convert it to dchar[] (or wchar[]).
>>
>> However, that brings up a good point:
>> Notice how foreach allows to iterate a string by Unicode characters
>> (a.k.a code-points)? Shouldn't this kind of iteration be supported
>> outside of foreach as well?
>
> see std.utf.decode and std.utf.stride.
>
> /Oskar
I have .. and I know the functions are all there. but hey, the C
standard library also has all sorts of string processing functions.
I'm talking about the "built-in" string type, which doesn't really
exist, even though the spec claims it does.
More information about the Digitalmars-d
mailing list