CompareNoCase()
Performs a case-insensitive comparison of two strings. An indicator of the difference:
- A negative number, if string1 is less than string2
- 0, if string1 is equal to string2
- A positive number, if string1 is greater than string2
CompareNoCase( string1=string, string2=string );
Returns: Number
Argument | Description |
---|---|
string1
string,
required
|
A string or a variable that contains one |
string2
string,
required
|
A string or a variable that contains one |
Examples
dump(CompareNoCase("100 MAIN ST.", "675 EAST AVENUE")); // -1
See also
- Strings
- string.compareNoCase()
- Search Issue Tracker
- Search Lucee Test Cases (good for further, detailed examples)