chickadee » srfi-135 » textual-prefix-length

(textual-prefix-length textual1 textual2 [start1 end1 start2 end2]) → integerprocedure
(textual-suffix-length textual1 textual2 [start1 end1 start2 end2]) → integerprocedure

Return the length of the longest common prefix/suffix of textual1 and textual2. 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 subtexts of textual1 and textual2.