chickadee » srfi-130 » string-prefix-length

string-prefix-lengthprocedure
string-suffix-lengthprocedure

Return the length of the longest common prefix/suffix of the two strings. For prefixes, this is equivalent to the "mismatch index" for the strings (modulo the start cursors).

The optional start / end cursors or indexes restrict the comparison to the indicated substrings of s1 and s2.