Latest Version: 2.0 RC 3 14 March 2017

Method _.compareStringI


Compares two strings after normalizing them. This operation is case insensitive.

"Normalize" means that _.stringNormalize() is called, which if the variable passed is null or undefined an empty string is returned, otherwise the result is trimmed of leading and trailing whitespace.

Calling Convention:
_.compareString(String, String)
Your strings to be normalized and compared.
-1 if first string is alphabetically lower than the second
0 if the two strings are equal
1 if first string is alphabetically higher than the second

The various compare functions stored in elementals are meant as easy callbacks for use with _.uSortElement.