Quickly fork, edit online, and submit a pull request for this page.
Requires a signed-in GitHub account. This works well for small changes.
If you'd like to make larger changes you may want to consider using
a local clone.

std.ascii

Functions which operate on ASCII characters.

All of the functions in std.ascii accept Unicode characters but
effectively ignore them if they're not ASCII. All isX functions return
false for non-ASCII characters, and all toX functions do nothing
to non-ASCII characters.

Whether or not c is in the ASCII character set - i.e. in the
range 0 .. 0x7F.

Examples:

assert( isASCII('a'));
assert(!isASCII('á'));

auto toLower(C)(C c)if (is(C : dchar));

Converts an ASCII letter to lowercase.

Parameters:

C c

A character of any type that implicitly converts to dchar.
In the case where it's a built-in type, or an enum of a built-in type,
Unqual!(OriginalType!C) is returned, whereas if it's a user-defined
type, dchar is returned.

Any type which implicitly converts to dchar. In the case
where it's a built-in type, or an enum of a built-in type,
Unqual!(OriginalType!C) is returned, whereas if it's a user-defined
type, dchar is returned.