str.cam - a CAMILA library for the finite string STR data type
strMIN(s:STR-set):STR
strCAT(l:STR-seq):STR
strCenter(s:STR,l:INT):STR
strLeft(s:STR,l:INT):STR
strRight(s:STR,l:INT):STR
strFill(s:STR,l:INT):STR
strSeq2STR(l:STR-seq,s:STR):STR
strSet2STR(X:STR-set,s:STR):STR
strFF2index(ff:A->STR):A-seq
This library provides a few functions useful in simple
string manipulation.
Note that strings in CAMILA type STR are of limited length.
For longer strings resort to txt.cam.
The informal semantics of the operators are as follows:
strMIN(s)
computes least of a set of strings
strCAT(l)
catenates all strings in sequence of strings l.
strCenter(s,l)
centers s in a string of length l, the extra
characters being `` ''. Pre-condition: l >= strlen(s)
Ibidem strCenter(s,l)
left-justifying instead of centering.
Pre-condition: l >= strlen(s)
Ibidem strCenter(s,l)
right-justifying instead of centering.
Pre-condition: l >= strlen(s)
strFill(s,l)
replicates s l times. Pre-condition: l >= 0
strSeq2STR(l)
converts sequence of strings l into a single
string, separated by s (typically, s=``,'').
strSet2STR is the counterpart of strSeq2STR for finite sets.
strFF2index(ff)
builds index of ff (range STR-increasing
ordering).
Manual(s)
of seq.cam.
J.N. Oliveira (jno@di.uminho.pt)