CharacterΒΆ
string.spad line 1 [edit on github]
This domain provides the basic character data type.
- <=: (%, %) -> Boolean
from PartialOrder
- <: (%, %) -> Boolean
from PartialOrder
- >=: (%, %) -> Boolean
from PartialOrder
- >: (%, %) -> Boolean
from PartialOrder
- alphabetic?: % -> Boolean
alphabetic?(c)
tests ifc
is a letter, i.e. one of a..z
or A..Z
.
- alphanumeric?: % -> Boolean
alphanumeric?(c)
tests ifc
is either a letter or number, i.e. one of 0..9, a..z
or A..Z
.
- char: Integer -> %
char(i)
provides a character corresponding to the integer codei
. It is alwaystrue
thatord char i = i
.
- char: String -> %
char(s)
provides a character from a strings
of length one.
- coerce: % -> OutputForm
from CoercibleTo OutputForm
- convert: % -> InputForm
from ConvertibleTo InputForm
- digit?: % -> Boolean
digit?(c)
tests ifc
is a digit character, i.e. one of 0..9.
- hash: % -> SingleInteger
from Hashable
- hashUpdate!: (HashState, %) -> HashState
from Hashable
- hexDigit?: % -> Boolean
hexDigit?(c)
tests ifc
is a hexadecimal numeral, i.e. one of 0..9, a..f
or A..F
.
- index: PositiveInteger -> %
from Finite
- latex: % -> String
from SetCategory
- lookup: % -> PositiveInteger
from Finite
- lowerCase?: % -> Boolean
lowerCase?(c)
tests ifc
is an lower case letter, i.e. one of a..z
.
- lowerCase: % -> %
lowerCase(c)
converts an upper case letter to the corresponding lower case letter. Ifc
is not an upper case letter, then it is returned unchanged.
- max: (%, %) -> %
from OrderedSet
- min: (%, %) -> %
from OrderedSet
- newline: () -> %
newline()
provides the newline character.
- ord: % -> Integer
ord(c)
provides an integral code corresponding to the characterc
. It is alwaystrue
thatchar ord c = c
.
- quote: () -> %
quote()
provides the string quote character,"
.
- size: () -> NonNegativeInteger
from Finite
- smaller?: (%, %) -> Boolean
from Comparable
- space: () -> %
space()
provides the blank character.
- underscore: () -> %
underscore()
provides the underscore character,_
, which is used to allow quotes and other characters within strings.
- upperCase?: % -> Boolean
upperCase?(c)
tests ifc
is an upper case letter, i.e. one of A..Z
.
- upperCase: % -> %
upperCase(c)
converts a lower case letter to the corresponding upper case letter. Ifc
is not a lower case letter, then it is returned unchanged.