vl-string-mismatch

AutoCad AutoLISP Functions

 
vl-string-mismatch
 
 
 

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