StringAggregateΒΆ

aggcat.spad line 2413

A string aggregate is a category for strings, that is, one dimensional arrays of characters.

=: (%, %) -> Boolean
from BasicType
~=: (%, %) -> Boolean
from BasicType
coerce: % -> OutputForm
from CoercibleTo OutputForm
coerce: Character -> %
coerce(c) returns c as a string s with the character c.
concat: (%, %) -> %
from LinearAggregate Character
concat: (%, Character) -> %
from LinearAggregate Character
concat: (Character, %) -> %
from LinearAggregate Character
concat: List % -> %
from LinearAggregate Character
construct: List Character -> %
from Collection Character
convert: % -> InputForm
from ConvertibleTo InputForm
copy: % -> %
from Aggregate
delete: (%, Integer) -> %
from LinearAggregate Character
delete: (%, UniversalSegment Integer) -> %
from LinearAggregate Character
elt: (%, %) -> %
elt(s, t) returns the concatenation of s and t. It is provided to allow juxtaposition of strings to work as concatenation. For example, "smoo" "shed" returns "smooshed".
elt: (%, Integer) -> Character
from Eltable(Integer, Character)
elt: (%, Integer, Character) -> Character
from EltableAggregate(Integer, Character)
elt: (%, UniversalSegment Integer) -> %
from Eltable(UniversalSegment Integer, %)
empty: () -> %
from Aggregate
empty?: % -> Boolean
from Aggregate
entries: % -> List Character
from IndexedAggregate(Integer, Character)
eq?: (%, %) -> Boolean
from Aggregate
eval: (%, Character, Character) -> % if Character has Evalable Character
from InnerEvalable(Character, Character)
eval: (%, Equation Character) -> % if Character has Evalable Character
from Evalable Character
eval: (%, List Character, List Character) -> % if Character has Evalable Character
from InnerEvalable(Character, Character)
eval: (%, List Equation Character) -> % if Character has Evalable Character
from Evalable Character
find: (Character -> Boolean, %) -> Union(Character, failed)
from Collection Character
first: % -> Character
from IndexedAggregate(Integer, Character)
hash: % -> SingleInteger
from SetCategory
hashUpdate!: (HashState, %) -> HashState
from SetCategory
index?: (Integer, %) -> Boolean
from IndexedAggregate(Integer, Character)
indices: % -> List Integer
from IndexedAggregate(Integer, Character)
insert: (%, %, Integer) -> %
from LinearAggregate Character
insert: (Character, %, Integer) -> %
from LinearAggregate Character
latex: % -> String
from SetCategory
leftTrim: (%, CharacterClass) -> %
leftTrim(s, cc) returns s with all leading characters in cc deleted. For example, leftTrim("(abc)", charClass "()") returns "abc)".
less?: (%, NonNegativeInteger) -> Boolean
from Aggregate
lowerCase!: % -> %
lowerCase!(s) destructively replaces the alphabetic characters in s by lower case.
lowerCase: % -> %
lowerCase(s) returns the string with all characters in lower case.
map: ((Character, Character) -> Character, %, %) -> %
from LinearAggregate Character
map: (Character -> Character, %) -> %
from HomogeneousAggregate Character
match?: (%, %, Character) -> Boolean
match?(s, t, c) tests if s matches t except perhaps for multiple and consecutive occurrences of character c. Typically c is the blank character.
maxIndex: % -> Integer
from IndexedAggregate(Integer, Character)
minIndex: % -> Integer
from IndexedAggregate(Integer, Character)
more?: (%, NonNegativeInteger) -> Boolean
from Aggregate
new: (NonNegativeInteger, Character) -> %
from LinearAggregate Character
position: (%, %, Integer) -> Integer
position(s, t, i) returns the position j of the substring s in string t, where j >= i is required.
position: (CharacterClass, %, Integer) -> Integer
position(cc, t, i) returns the position j >= i in t of the first character belonging to cc.
prefix?: (%, %) -> Boolean
prefix?(s, t) tests if the string s is the initial substring of t. Note: prefix?(s, t) == reduce(and, [s.i = t.i for i in 0..maxIndex s]).
qelt: (%, Integer) -> Character
from EltableAggregate(Integer, Character)
replace: (%, UniversalSegment Integer, %) -> %
replace(s, i..j, t) replaces the substring s(i..j) of s by string t.
rightTrim: (%, CharacterClass) -> %
rightTrim(s, cc) returns s with all trailing occurrences of characters in cc deleted. For example, rightTrim("(abc)", charClass "()") returns "(abc".
sample: %
from Aggregate
size?: (%, NonNegativeInteger) -> Boolean
from Aggregate
split: (%, Character) -> List %
split(s, c) returns a list of substrings delimited by character c.
split: (%, CharacterClass) -> List %
split(s, cc) returns a list of substrings delimited by characters in cc.
substring?: (%, %, Integer) -> Boolean
substring?(s, t, i) tests if s is a substring of t beginning at index i. Note: substring?(s, t, 0) = prefix?(s, t).
suffix?: (%, %) -> Boolean
suffix?(s, t) tests if the string s is the final substring of t. Note: suffix?(s, t) == reduce(and, [s.i = t.(n - m + i) for i in 0..maxIndex s]) where m and n denote the maxIndex of s and t respectively.
trim: (%, CharacterClass) -> %
trim(s, cc) returns s with all characters in cc deleted from right and left ends. For example, trim("(abc)", charClass "()") returns "abc".
upperCase!: % -> %
upperCase!(s) destructively replaces the alphabetic characters in s by upper case characters.
upperCase: % -> %
upperCase(s) returns the string with all characters in upper case.

Aggregate

BasicType

CoercibleTo OutputForm

Collection Character

ConvertibleTo InputForm

Eltable(Integer, Character)

Eltable(UniversalSegment Integer, %)

EltableAggregate(Integer, Character)

Evalable Character if Character has Evalable Character

finiteAggregate

FiniteLinearAggregate Character

HomogeneousAggregate Character

IndexedAggregate(Integer, Character)

InnerEvalable(Character, Character) if Character has Evalable Character

LinearAggregate Character

OneDimensionalArrayAggregate Character

SetCategory

shallowlyMutable