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.

std.uni

Functions which operate on Unicode characters.

For functions which operate on ASCII characters and ignore Unicode characters, see std.ascii.

References:
ASCII Table, Wikipedia, The Unicode Consortium

Trademarks:
Unicode(tm) is a trademark of Unicode, Inc.

License:
Boost License 1.0.

Authors:
Walter Bright, Jonathan M Davis, and Kenji Hara

Source:
std/uni.d

dchar lineSep;
UTF line separator

dchar paraSep;
UTF paragraph separator

pure nothrow @safe bool isWhite(dchar c);
Whether or not c is a Unicode whitespace character. (general Unicode category: Part of C0(tab, vertical tab, form feed, carriage return, and linefeed characters), Zs, Zl, Zp, and NEL(U+0085))

pure nothrow @safe bool isLower(dchar c);
Return whether c is a Unicode lowercase character.

pure nothrow @safe bool isUpper(dchar c);
Return whether c is a Unicode uppercase character.

pure nothrow @safe dchar toLower(dchar c);
If c is a Unicode uppercase character, then its lowercase equivalent is returned. Otherwise c is returned.

pure nothrow @safe dchar toUpper(dchar c);
If c is a Unicode lowercase character, then its uppercase equivalent is returned. Otherwise c is returned.

pure nothrow @safe bool isAlpha(dchar c);
Returns whether c is a Unicode alpha character (general Unicode category: Lu, Ll, Lt, Lm, and Lo).

Standards:
Unicode 5.0.0.

pure nothrow @safe bool isMark(dchar c);
Returns whether c is a Unicode mark (general Unicode category: Mn, Me, Mc).

Standards:
Unicode 6.0.0.

pure nothrow @safe bool isNumber(dchar c);
Returns whether c is a Unicode numerical character (general Unicode category: Nd, Nl, No).

Standards:
Unicode 6.0.0.

pure nothrow @safe bool isPunctuation(dchar c);
Returns whether c is a Unicode punctuation character (general Unicode category: Pd, Ps, Pe, Pc, Po, Pi, Pf).

Standards:
Unicode 6.0.0.

pure nothrow @safe bool isSymbol(dchar c);
Returns whether c is a Unicode symbol character (general Unicode category: Sm, Sc, Sk, So)

Standards:
Unicode 6.0.0.

pure nothrow @safe bool isSpace(dchar c);
Returns whether c is a Unicode whitespace character (general Unicode category: Zs)

Standards:
Unicode 6.0.0.

pure nothrow @safe bool isGraphical(dchar c);
Returns whether c is a Unicode graphical character (general Unicode category: L, M, N, P, S, Zs).

Standards:
Unicode 6.0.0.

pure nothrow @safe bool isControl(dchar c);
Returns whether c is a Unicode control character (general Unicode category: Cc)

Standards:
Unicode 6.0.0.

pure nothrow @safe bool isFormat(dchar c);
Returns whether c is a Unicode formatting character (general Unicode category: Cf)

Standards:
Unicode 6.0.0.

pure nothrow @safe bool isPrivateUse(dchar c);
Returns whether c is a Unicode Private Use character (general Unicode category: Co)

Standards:
Unicode 6.0.0.

pure nothrow @safe bool isSurrogate(dchar c);
Returns whether c is a Unicode surrogate character (general Unicode category: Cs)

Standards:
Unicode 6.0.0.

pure nothrow @safe bool isSurrogateHi(dchar c);
Returns whether c is a Unicode high surrogate (lead surrogate).

Standards:
Unicode 2.0.

pure nothrow @safe bool isSurrogateLo(dchar c);
Returns whether c is a Unicode low surrogate (trail surrogate).

Standards:
Unicode 2.0.

pure nothrow @safe bool isNonCharacter(dchar c);
Returns whether c is a Unicode non-character (general Unicode category: Cn)

Standards:
Unicode 6.0.0.