Why UTF-8/16 character encodings?

Peter Alexander peter.alexander.au at gmail.com
Sat May 25 07:17:57 PDT 2013


On Saturday, 25 May 2013 at 14:16:21 UTC, Peter Alexander wrote:
> int countSpaces(const(char)* c)
> {
>     int n = 0;
>     while (*c)
>         if (*c == ' ')
>             ++n;
>     return n;
> }

Oops. Missing a ++c in there, but I'm sure the point was made :-)


More information about the Digitalmars-d mailing list