Guile Reference Manual
39.11.8 Prefixes/Suffixes
Using these procedures you can determine whether a given string is a
prefix or suffix of another string or how long a common prefix/suffix
is.
- Scheme Procedure: string-prefix-length s1 s2 [start1 end1 start2 end2]
-
- Scheme Procedure: string-prefix-length-ci s1 s2 [start1 end1 start2 end2]
-
- Scheme Procedure: string-suffix-length s1 s2 [start1 end1 start2 end2]
-
- Scheme Procedure: string-suffix-length-ci s1 s2 [start1 end1 start2 end2]
- Return the length of the longest common prefix/suffix of the two
strings.
string-prefix-length-ci and
string-suffix-length-ci are the case-insensitive variants.
- Scheme Procedure: string-prefix? s1 s2 [start1 end1 start2 end2]
-
- Scheme Procedure: string-prefix-ci? s1 s2 [start1 end1 start2 end2]
-
- Scheme Procedure: string-suffix? s1 s2 [start1 end1 start2 end2]
-
- Scheme Procedure: string-suffix-ci? s1 s2 [start1 end1 start2 end2]
- Is s1 a prefix/suffix of s2.
string-prefix-ci? and
string-suffix-ci? are the case-insensitive variants.