vl-string-mismatch (AutoLISP)

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

Supported Platforms: Windows and Mac OS

Signature

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

Type: String

The first textual value to be matched.

str2

Type: String

The second textual value to be matched.

pos1

Type: Integer

A numeric value identifying the position to search from in the first string; 0 if omitted.

pos2

Type: Integer

A numeric value identifying the position to search from in the second string; 0 if omitted.

ignore-case-p

Type: T or nil

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

Return Values

Type: Integer

A numeric value.

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