Skip to content

dos_strcmplogical

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

Compares two strings logically, or naturally. Digits in the strings are considered as numerical content rather than text. This test is not case-sensitive. Note, Windows Explorer sorts files using this method.

Syntax

(dos_strcmplogical string1 string2)

Parameters

string1

The first string.

string2

The second string.

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_strcmplogical "Layer2" "Layer3")
-1

Command: (dos_strcmplogical "Layer2" "Layer20")
-1

Command: (dos_strcmplogical "Layer3" "Layer20")
-1

Command: (dos_strcmplogical "Layer30" "Layer20")
1

Clone this wiki locally