View source code Display the source code in std/ascii.d from which this page was generated on github. Improve this page 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 local clone. Page wiki View or edit the community-maintained wiki page associated with this page.

Module 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.

For functions which operate on Unicode characters, see std.uni.

References

ASCII Table, Wikipedia

Functions

Name Description
isAlpha
isAlphaNum
isASCII
isControl
isDigit
isGraphical
isHexDigit
isLower
isOctalDigit
isPrintable
isPunctuation
isUpper
isWhite
toLower Converts an ASCII letter to lowercase.
toUpper Converts an ASCII letter to uppercase.

Enums

Name Description
LetterCase Letter case specifier.

Global variables

Name Type Description
digits immutable(char[]) 0..9
fullHexDigits immutable(char[]) 0..9A..Fa..f
hexDigits immutable(char[]) 0..9A..F
letters immutable(char[]) A..Za..z
lowercase immutable(char[]) a..z
lowerHexDigits immutable(char[]) 0..9a..f
newline immutable(char[]) Newline sequence for this system.
octalDigits immutable(char[]) 0..7
uppercase immutable(char[]) A..Z
whitespace immutable(char[]) ASCII whitespace

Authors

Walter Bright and Jonathan M Davis

License

Boost License 1.0.

Comments