Next: Sequence Comparison, Previous: Soundex, Up: Sorting and Searching [Contents][Index]
Returns the index of the first occurence of char within
string, or #f
if the string does not contain a
character char.
Returns the index of the last occurence of char within
string, or #f
if the string does not contain a
character char.
Searches string to see if some substring of string is equal
to pattern. substring?
returns the index of the first
character of the first substring of string that is equal to
pattern; or #f
if string does not contain
pattern.
(substring? "rat" "pirate") ⇒ 2 (substring? "rat" "outrage") ⇒ #f (substring? "" any-string) ⇒ 0
Looks for a string str within the first max-no-chars chars of the input port in-port.
When called with two arguments, the search span is limited by the end of the input stream.
Searches up to the first occurrence of character char in str.
Searches up to the first occurrence of the procedure proc returning non-false when called with a character (from in-port) argument.
When the str is found, find-string-from-port?
returns the
number of characters it has read from the port, and the port is set to
read the first char after that (that is, after the str) The
function returns #f
when the str isn’t found.
find-string-from-port?
reads the port strictly
sequentially, and does not perform any buffering. So
find-string-from-port?
can be used even if the in-port is
open to a pipe or other communication channel.
Returns a copy of string txt with all occurrences of string old1 in txt replaced with new1; then old2 replaced with new2 …. Matches are found from the left. Matches do not overlap.
Returns the number of ‘#\newline’ characters in string str.
Next: Sequence Comparison, Previous: Soundex, Up: Sorting and Searching [Contents][Index]