chickadee » srfi-13 » string-prefix-ci?

(string-prefix? s1 s2 [start1 end1 start2 end2]) -> booleanprocedure
(string-suffix? s1 s2 [start1 end1 start2 end2]) -> booleanprocedure
(string-prefix-ci? s1 s2 [start1 end1 start2 end2]) -> booleanprocedure
(string-suffix-ci? s1 s2 [start1 end1 start2 end2]) -> booleanprocedure

Is S1 a prefix/suffix of S2?

The optional start/end indices restrict the comparison to the indicated substrings of S1 and S2.

string-prefix-ci? and string-suffix-ci? are the case-insensitive variants. Case-insensitive comparison is done by case-folding characters with the operation

(char-downcase (char-upcase c))

where the two case-mapping operations are assumed to be 1-1, locale- and context-insensitive, and compatible with the 1-1 case mappings specified by Unicode's UnicodeData.txt table:

ftp://ftp.unicode.org/Public/UNIDATA/UnicodeData.txt

Comparison is simply done on individual code-points of the string.