create(sz : CARD, lib : LIBCHARS) : SAME This creation routine is used for all forms of creation not involving
setting some initial value, where the initial default size is 0 and the
default culture is used if necessary.
create(lib : LIBCHARS) : SAME
create(sz : CARD) : SAME
create : SAME
create(
src : RUNES
) : SAME is
-- This routine creates and fills a buffer from src.
create_from_ucs2(
str : BINSTR,
lib : LIBCHARS
) : SAME
-- This routine builds the runes from the binary string indicated,
-- assuming that the encoding is UCS2 - not UCS4.
from_frunes(
fstr : FRUNES
) : SAME
-- This routine converts the given fast rune string into the normal
-- string form (which has immutable semantics). The 'generic' from_fstr
-- routine is used to avoid renaming problems for other uses.
cursor : RUNES_CURSOR
-- This routine returns a cursor object corresponding to the contents of
-- self.
push(
elem : RUNE
) : SAME
pre void(self)
or (index_lib = elem.lib)
post (result.size = (initial(size) + 1))
is
-- This routine appends a new element to the end of self and returns it.
-- If self is void, create a new list.
aget(index : CARD) : RUNE
aset(index : CARD, val : RUNE)
vset(
index : CARD,
elem : RUNE
) : SAME
pre ~void(self)
and (index <= (indices.size - 1))
post true
is
-- This routine is the 'array' indexing facility for the case where
-- the number of codes in elem is different from the number currently at that
-- index position in the string. A new rune string has to be produced if the
-- resulting length is different from that currently allocated.
rune(
index : CARD
) : RUNE
-- This routine returns the value of the rune at the given index.
char(
index : CARD
) : RUNE
-- This routine is a synonym for rune above. It is included to match
-- the required abstract interface definition.
ucs2 : BINSTR
-- This routine returns a copy of self which is the UCS2 binary form.
-- It is provided for cases where it is necessary to put the string into that
-- form. No count is included. If it is not possible to represent the rune
-- string in UCS2 coding then void is returned.
convert(
lib : LIBCHARS
) : SAME
-- This routine converts self to be in the given encoding and
-- repertoire. If any character has no corresponding code then void is
-- returned.
split!(once rn : RUNE) : SAME This iter yields successive substrings of self which are separated
by the single character given. Separating characters are omitted and
the string yielded starts after the previous separating character up to
and NOT including the next (or the end of self if not found).
separate!(str : SAME) : SAME On the first iteration this returns str, thereafter on successive
iterations it returns self followed by str. Useful for forming lists.
text_str(
lib : LIBCHARS
) : STR
-- This routine returns a string representation of self in the given
-- repertoire and encoding as a space separated sequence of hex numbers.
text_str : STR
-- This routine returns a string representation of self in the default
-- repertoire and encoding as a space separated sequence of hex numbers.