isAsciiString in Phobos?
Andrej Mitrovic
andrej.mitrovich at gmail.com
Mon Oct 7 09:23:04 PDT 2013
On 10/7/13, monarch_dodra <monarchdodra at gmail.com> wrote:
> If we want even more efficiency, we could iterate on the string,
> interpreting it as a size_t[]. We mask each of its elements with
> 0x80808080/0x80808080_80808080, and if one of the resulting
> masked elements is not null, then the string isn't ASCII.
Clever! So I think we should definitely try and push it to the library.
More information about the Digitalmars-d-learn
mailing list