Next: , Previous: , Up: strings   [Index]


25.13 Searching

Function: %string-index char/char-set/pred str start past
Function: %string-index-right char/char-set/pred str start past
Macro: string-index S char/char-set/pred
Macro: string-index-right S char/char-set/pred

Search through the string from the left or right, returning the index of the first occurrence of a character which:

If no match is found: Return #f.

Function: %string-skip char/char-set/pred str start past
Function: %string-skip-right char/char-set/pred str start past
Macro: string-skip S char/char-set/pred
Macro: string-skip-right S char/char-set/pred

Search through the string from the left or right, returning the index of the first occurrence of a character which:

If no match is found: Return #f.

Function: %string-count char/char-set/pred str start past
Macro: string-count S char/char-set/pred

Return a count of the number of characters in str that satisfy the char/char-set/pred argument:

Function: %string-contains str1 start1 past1 str2 start2 past2
Function: %string-contains-ci str1 start1 past1 str2 start2 past2
Macro: string-contains S1 S2
Macro: string-contains-ci S1 S2

Return true if the selected substring of str1 contains the selected substring of str2, else return #f. The return value is the index in str1 where the substring of str2 occurs.

Function: %string-search-and-replace src start1 past1 pattern start2 past2 replace start3 past3 max-replacement-count
Function: %string-search-and-replace-ci src start1 past1 pattern start2 past2 replace start3 past3 max-replacement-count
Macro: string-search-and-replace SRC PATTERN REPLACE max-replacement-count
Macro: string-search-and-replace-ci SRC PATTERN REPLACE max-replacement-count

Build and return a copy of the selected substring of src, in which the occurrences of the selected substring of pattern are replaced with the selected substring of replace.

At most max-replacement-count occurrences are replaced: if it is zero, the selected substring of src is returned; if it is +inf.0, all the occurrences are replaced.


Next: , Previous: , Up: strings   [Index]