- Reference >
- Operators >
- Aggregation Framework Operators >
- String Aggregation Operators >
- $strcasecmp (aggregation)
$strcasecmp (aggregation)¶
-
$strcasecmp¶ Takes in two strings. Returns a number.
$strcasecmpis positive if the first string is “greater than” the second and negative if the first string is “less than” the second.$strcasecmpreturns 0 if the strings are identical.Note
$strcasecmpmay not make sense when applied to glyphs outside the Roman alphabet.$strcasecmpinternally capitalizes strings before comparing them to provide a case-insensitive comparison. Use$cmpfor a case sensitive comparison.