Node:SRFI-13 Prefixes/Suffixes, Next:, Previous:SRFI-13 Comparison, Up:SRFI-13



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.

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] Scheme Procedure
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.

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] Scheme Procedure
Is s1 a prefix/suffix of s2. string-prefix-ci? and string-suffix-ci? are the case-insensitive variants.