Iterate over a string to get unicode codes
Flamaros
flamaros.xavier at gmail.com
Sun Sep 1 08:45:20 PDT 2013
On Sunday, 1 September 2013 at 14:11:54 UTC, Adam D. Ruppe wrote:
> On Sunday, 1 September 2013 at 14:07:00 UTC, Flamaros wrote:
>> Is there a simple way to extract from a string all Unicode
>> codes as uint values?
>
> string foo = "whatever";
>
> foreach(dchar ch; foo) {
> // ch is the code point as a 32 bit number
> // use it directly or cast to uint here
> }
Thx, it's easier than I thought.
More information about the Digitalmars-d-learn
mailing list