Today's programming challenge - How's your Range-Fu ?

Jakob Ovrum via Digitalmars-d digitalmars-d at puremagic.com
Sat Apr 18 05:56:11 PDT 2015


On Saturday, 18 April 2015 at 12:48:53 UTC, Jacob Carlborg wrote:
> On 2015-04-18 14:25, Gary Willoughby wrote:
>
>> byGrapheme to the rescue:
>>
>> http://dlang.org/phobos/std_uni.html#byGrapheme
>>
>> Or is this unsuitable here?
>
> How is byGrapheme supposed to be used? I tried this put it 
> doesn't do what I expected:
>
> foreach (e ; "e\u0301".byGrapheme)
>     writeln(e);

void main()
{
     import std.stdio;
     import std.uni;

     foreach (e ; "e\u0301".byGrapheme)
         writeln(e[]);
}


More information about the Digitalmars-d mailing list