Bug 13020 – std.ascii.isASCII for strings too or @nogc all!isASCII

Status
RESOLVED
Resolution
DUPLICATE
Severity
enhancement
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-07-02T12:08:00Z
Last change time
2016-04-05T00:58:23Z
Assigned to
nobody
Creator
bearophile_hugs

Comments

Comment #0 by bearophile_hugs — 2014-07-02T12:08:33Z
In std.ascii there is the function: pure nothrow @safe bool isASCII(dchar c); I suggest to add an isASCII overload that works on whole strings too (note that it's @nogc too): bool isASCII(in string s) pure nothrow @safe @nogc; Currently you can write: s.all!isASCII But this is not @nogc. An alternative solution is to make "all!isASCII" @nogc.
Comment #1 by jack — 2016-04-05T00:58:23Z
*** This issue has been marked as a duplicate of issue 11356 ***