Next: strings views, Previous: strings intro, Up: strings [Index]
The following conventions hold:
-ci
are case–insensitive variants.
!
are side–effecting variants.
What values these procedures return is usually not specified.
Direction | Suffix |
---|---|
left-to-right | ?none |
right-to-left | –right |
both | –both |
In the procedure specifications:
0 <= start <= past <= (string-length s)
for the corresponding argument str. They typically restrict a procedure’s action to the indicated substring; when start equals past the selected substring is the empty string.
An argument followed by ...
means zero–or–more elements. So
the procedure with the signature:
sum-squares x ...
takes zero or more arguments (x, …), while the procedure with signature:
spell-check doc dict1 dict2 ...
takes two mandatory arguments (doc and dict1) and zero or more optional arguments (dict2 ...).
If a procedure is said to return “unspecified”, this means that nothing at all is known about what the procedure returns. Such a procedure is not even required to be consistent from call to call. It is simply required to return a value (or values) that may be passed to a command continuation, e.g. as the value of an expression appearing as a non–terminal subform of a begin expression.
Comparison is simply done on individual code–points of the string. Unless explicitly stated, for all the functions: Case–insensitive comparison is done using the functions:
char-ci=? char-ci<? char-ci>? char-ci<=? char-ci>=?
provided by the underlying implementation, or by case–folding characters with the operation:
(char-downcase (char-upcase c))
where the two case–mapping operations are assumed to be one–to–one, locale–insensitive and context–insensitive, and compatible with the one–to–one case mappings specified by Unicode’s UnicodeData.txt table:
Next: strings views, Previous: strings intro, Up: strings [Index]