-
Effekt Library
- char
- isWhitespace
- digitValue
- hexDigitValue
- digitValue
- isDigit
- isHexDigit
- isDigit
- isASCII
- isLower
- isUpper
- isAlphanumeric
- isAlphabetic
- toString
- toInt
- toChar
- infixLt
- infixLte
- infixGt
- infixGte
- utf8ByteCount
- utf16UnitCount
- charWidth
- writeLine
- readLine
- returning
- writeLine
- readLine
- decodeChar
- encodeChar
- decodeUTF8
- encodeUTF8
- char Jump to source: libraries/common/char.effekt
- isWhitespace
(c: Char): Bool / {} - digitValue
(char: Char): Int / {Exception[WrongFormat]} - hexDigitValue
(char: Char): Int / {Exception[WrongFormat]} - digitValue
(char: Char, base: Int): Int / {Exception[WrongFormat]} - isDigit
(char: Char): Bool / {} - isHexDigit
(char: Char): Bool / {} - isDigit
(char: Char, base: Int): Bool / {} - isASCII
(c: Char): Bool / {} - isLower
(c: Char): Bool / {} - isUpper
(c: Char): Bool / {} - isAlphanumeric
(c: Char): Bool / {} - isAlphabetic
(c: Char): Bool / {} - toString
(ch: Char): String / {} - toInt
(ch: Char): Int / {} - toChar
(codepoint: Int): Char / {} - infixLt
(x: Char, y: Char): Bool / {} - infixLte
(x: Char, y: Char): Bool / {} - infixGt
(x: Char, y: Char): Bool / {} - infixGte
(x: Char, y: Char): Bool / {} - utf8ByteCount
(codepoint: Char): Int / {} - utf16UnitCount
(codepoint: Char): Int / {} - charWidth
(c: Char): Int / {} - writeLine
{ body: => Unit / {emit[Char]} }: Unit / {emit[Char]} - readLine
{ body: => Unit / {read[Char]} }: Unit / {read[Char], stop} - returning
- writeLine
[R] { body: => R / {emit[Char]} }: R / {emit[Char]} - readLine
[R] { body: => R / {read[Char]} }: R / {read[Char], stop} - decodeChar
: Char / {read[Byte], stop} - encodeChar
(char: Char): Unit / {emit[Byte]} - decodeUTF8
[R] { reader: => R / {read[Char]} }: R / {read[Byte]} - encodeUTF8
[R] { stream: => R / {emit[Char]} }: R / {emit[Byte]}
Example usage: examples/stdlib/char
Warning: This library currently only works with ASCII characters, **not** unicode!
Checks if the given character is an ASCII whitespace
Gets the value of a given ASCII digit in base 10, throwing an exception on wrong format
Gets the value of a given ASCII digit in base 16, throwing an exception on wrong format
Gets the value of a given ASCII digit in the given base up to 36, throwing an exception on wrong format
Checks if the given character is an ASCII digit in base 10 Prefer using `digitValue(c: Char)` to get the numeric value out.
Checks if the given character is an ASCII digit in base 16 Prefer using `hexDigitValue(c: Char)` to get the numeric value out.
Checks if the given character is an ASCII digit in base 10 Prefer using `digitValue(c: Char, base: Int)` to get the numeric value out.
Checks if a given character is a 7-bit ASCII character
Checks if a given character is an ASCII lower alphabetic character
Checks if a given character is an ASCII upper alphabetic character
Checks if a given character is an ASCII alphabetic or numeric character
Checks if a given character is an ASCII alphabetic character