vl-string-mismatch (AutoLISP)

Returns the length of the longest common prefix for two strings, starting at specified positions

(vl-string-mismatch str1 str2 [pos1 pos2 ignore-case-p])

Arguments

str1

The first string to be matched.

str2

The second string to be matched.

pos1

An integer identifying the position to search from in the first string; 0 if omitted.

pos2

An integer identifying the position to search from in the second string; 0 if omitted.

ignore-case-p

If T is specified for this argument, case is ignored; otherwise, case is considered.

Return Values

An integer.

Examples

(vl-string-mismatch "VL-FUN" "VL-VAR")
3

(vl-string-mismatch "vl-fun" "avl-var")
0

(vl-string-mismatch "vl-fun" "avl-var" 0 1)
3

(vl-string-mismatch "VL-FUN" "Vl-vAR")
1

(vl-string-mismatch "VL-FUN" "Vl-vAR" 0 0 T)
3