index
or strchr
functions from the C library.
string-index
, but search from the right of the string rather
than from the left. This procedure essentially implements the
rindex
or strrchr
functions from the C library.
substring-move-right!
begins copying from the rightmost character
and moves left, and substring-move-left!
copies from the leftmost
character moving right.
It is useful to have two functions that copy in different directions so
that substrings can be copied back and forth within a single string. If
you wish to copy text from the left-hand side of a string to the
right-hand side of the same string, and the source and destination
overlap, you must be careful to copy the rightmost characters of the
text first, to avoid clobbering your data. Hence, when str1 and
str2 are the same string, you should use
substring-move-right!
when moving text from left to right, and
substring-move-left!
otherwise. If str1
and `str2'
are different strings, it does not matter which function you use.
substring-move-right!
and
substring-move-left!
#t
if str's length is nonzero, and #f
otherwise.
str
, respectively.
Go to the first, previous, next, last section, table of contents.