vl-string-mismatch


(vl-string-mismatch strA strB [ pos1 [ pos2 [ ignoreCase ] ] ] )

This function compares strA against strB to identify the longest common (identical) sub-string part.

Arguments

strA  (string)  first string to be verified
strB  (string)  second string to be verified
pos1  (integer, optional)  the start index in strA; if omitted, 0 is used (start of strA)
pos2  (integer, optional)  the start index in strB; if omitted, 0 is used (start of strB)
ignoreCase  (T/NIL, optional)  if specified as T, the case of the strings is ignored; otherwise the strings are processed  case-sensitive; default NIL

Return

(integer) the length of the common (identical) sub-string parts

Example

(vl-string-mismatch "abcXYZ" "AbC ABCxyz")  0
(vl-string-mismatch "abcXYZ" "AbC ABCxyz" 0 0 t)  3
(vl-string-mismatch "abcXYZ" "AbC ABCxyz" 0 4 t)  6
(vl-string-mismatch "abcXYZ" "AbC ABCxyz" 0 4 nil)  0

Remarks

first character position/index in a string is at index 0



©  Bricsys NV. All rights reserved.