Skip to content
FutureBlitz

    Install

    Import std.text.char

    std.text.char

    A Char's Methods: its code, what kind of character it is, as Unicode's general categories say, and its own uppercase and lowercase, through the runtime's fb_unicode_ functions over utf8proc. Whitespace and ASCII need no Unicode data.

    std/text/char.fb

    Extends

    Char extend

    Extend Char

    No doc comment.

    std/text/char.fb, line 13

    • Public Property Code: Int property #

      Its code point, from 0 to 0x10FFFF.

    • Public Property Utf8Length: Int property #

      How many bytes it takes in UTF-8: 1 to 4.

    • Public Static Method From(code: Int): Char? static method #

      The Char of a code point, or Null for one that isn't a Unicode scalar value: below 0, past 0x10FFFF, or a surrogate, 0xD800 to 0xDFFF.

    • Public Method IsLetter(): Bool method #

      Whether it's a letter, of any case or none, as in "é", "ж", or "中".

    • Public Method IsDigit(): Bool method #

      Whether it's a decimal digit, of any script, like "7" or "٣".

    • Public Method IsNumber(): Bool method #

      Whether it's a number of any kind: a decimal digit, a letter like a Roman numeral, or another like "½".

    • Public Method IsLetterOrDigit(): Bool method #

      Whether it's a letter or a decimal digit.

    • Public Method IsUpper(): Bool method #

      Whether it's an uppercase letter.

    • Public Method IsLower(): Bool method #

      Whether it's a lowercase letter.

    • Public Method IsPunctuation(): Bool method #

      Whether it's punctuation, like "," or "¿".

    • Public Method IsSymbol(): Bool method #

      Whether it's a symbol, like "+", "$", or "©".

    • Public Method IsControl(): Bool method #

      Whether it's a control character, like a tab or a line break.

    • Public Method IsWhitespace(): Bool method #

      Whether it's whitespace, as Unicode's White_Space has it: a space of any width, a tab, a line or paragraph break, and the like.

    • Public Method IsAscii(): Bool method #

      Whether it's ASCII, U+0000 to U+007F.

    • Public Method ToUpper(): Char method #

      Its own uppercase, or itself when it has none. A String's ToUpper turns "ß" into "SS", which one Char can't hold.

    • Public Method ToLower(): Char method #

      Its own lowercase, or itself when it has none.

    Report an issue with this page or with FutureBlitz on GitHub.