The
compareNoCase function
compares the two strings expressions
string1 and
string2 character by character to determine the alphabetical (collating sequence) order of the strings. The strings are compared in a case-insensitive manner. The
compare function compares strings in a case-sensitive manner.
Note: When using the Original
logic version, if
string1 and
string2 are of different lengths, the function will pad the shorter string with blanks to carry out the comparison. For example,
compareNoCase("a", "A ") returns 0, whereas it returns -1 when using logic version CSPro 8.0+.
The function returns an integer value of:
-1 | if string1 would be listed alphabetically before string2. |
0 | if the strings are identical. |
1 | if string1 would be listed alphabetically after string2. |