chickadee » srfi-152 » string-prefix-length

(string-prefix-length string₁ string₂ [start₁ end₁ start₂ end₂]) → integerprocedure
(string-suffix-length string₁ string₂ [start₁ end₁ start₂ end₂]) → integerprocedure

Return the length of the longest common prefix/suffix of string₁ and string₂. For prefixes, this is equivalent to their "mismatch index" (relative to the start indexes).

The optional start/end indexes restrict the comparison to the indicated substrings of string₁ and string₂.