Skip to content

dos_strcompare

Dale Fugier edited this page Jul 1, 2026 · 1 revision

Compares two strings (case sensitive or case insensitive).

Syntax

(dos_strcompare string1 string2 [T])

Parameters

string1

The first string.

string2

The second string.

T

If specified as T, a case insensitive comparison is performed. Otherwise, a case sensitive comparison is performed.

Returns

Zero if the strings are identical, < 0 if string1 is less than string2, or > 0 if string1 object is greater than string2.

nil on error.

Example

Command: (dos_strcompare "AutoCAD" "AUTOCAD")
1

Command: (dos_strcompare "AutoCAD" "AUTOCAD" T)
0

Clone this wiki locally