@tempots/std
compareCaseInsensitive() function
Compares two strings ignoring their case.
Signature:
compareCaseInsensitive: (a: string, b: string) => number
Parameters
Parameter |
Type |
Description |
---|---|---|
a |
string |
The first string to compare. |
b |
string |
The second string to compare. |
Returns: number
A negative number if a
is less than b
, zero if they are equal, or a positive number if a
is greater than b
.