public static function Unicode::strcasecmp in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/lib/Drupal/Component/Utility/Unicode.php \Drupal\Component\Utility\Unicode::strcasecmp()
Compares UTF-8-encoded strings in a binary safe case-insensitive manner.
Parameters
string $str1: The first string.
string $str2: The second string.
Return value
int Returns < 0 if $str1 is less than $str2; > 0 if $str1 is greater than $str2, and 0 if they are equal.
File
- core/
lib/ Drupal/ Component/ Utility/ Unicode.php, line 588 - Contains \Drupal\Component\Utility\Unicode.
Class
- Unicode
- Provides Unicode-related conversions and operations.
Namespace
Drupal\Component\UtilityCode
public static function strcasecmp($str1, $str2) {
return strcmp(static::strtoupper($str1), static::strtoupper($str2));
}