Character

string.spad line 1 [edit on github]

This domain provides the basic character data type.

< : (%, %) -> Boolean
from PartialOrder
<= : (%, %) -> Boolean
from PartialOrder
= : (%, %) -> Boolean
from BasicType
> : (%, %) -> Boolean
from PartialOrder
>= : (%, %) -> Boolean
from PartialOrder
alphabetic? : % -> Boolean

alphabetic?(c) tests if c is a letter, i.e. one of a..z or A..Z.

alphanumeric? : % -> Boolean

alphanumeric?(c) tests if c 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 code i. It is always true that ord char i = i.

char : String -> %

char(s) provides a character from a string s of length one.

coerce : % -> OutputForm
from CoercibleTo(OutputForm)
convert : % -> InputForm
from ConvertibleTo(InputForm)
digit? : % -> Boolean

digit?(c) tests if c is a digit character, i.e. one of 0..9.

enumerate : () -> List(%)
from Finite
hash : % -> SingleInteger
from Hashable
hashUpdate! : (HashState, %) -> HashState
from Hashable
hexDigit? : % -> Boolean

hexDigit?(c) tests if c 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 : % -> %

lowerCase(c) converts an upper case letter to the corresponding lower case letter. If c is not an upper case letter, then it is returned unchanged.

lowerCase? : % -> Boolean

lowerCase?(c) tests if c is an lower case letter, i.e. one of a..z.

max : (%, %) -> %
from OrderedSet
min : (%, %) -> %
from OrderedSet
newline : () -> %

newline() provides the newline character.

ord : % -> Integer

ord(c) provides an integral code corresponding to the character c. It is always true that char ord c = c.

quote : () -> %

quote() provides the string quote character, ".

random : () -> %
from Finite
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 : % -> %

upperCase(c) converts a lower case letter to the corresponding upper case letter. If c is not a lower case letter, then it is returned unchanged.

upperCase? : % -> Boolean

upperCase?(c) tests if c is an upper case letter, i.e. one of A..Z.

~= : (%, %) -> Boolean
from BasicType

Finite

Comparable

BasicType

OrderedFinite

CoercibleTo(OutputForm)

OrderedSet

SetCategory

Hashable

PartialOrder

ConvertibleTo(InputForm)