Performs case-insensitive comparison of two strings. Returns
- 1 if first string is “greater than” the second string.
- 0 if the two strings are equal.
- -1 if the first string is “less than” the second string.
$strcasecmphas the following syntax:
$strcasecmp only has a well-defined behavior for strings of ASCII characters.
For a case sensitive comparison, see
inventory collection with the following documents:
The following operation uses the
$strcasecmp operator to perform case-insensitive comparison of the
quarter field value to the string
The operation returns the following results: