public static Unicode::strtoupper($text)
Converts a UTF-8 string to uppercase.
Parameters
string $text: The string to run the operation on.
Return value
string The string in uppercase.
File
- core/lib/Drupal/Component/Utility/Unicode.php, line 302
Class
- Unicode
- Provides Unicode-related conversions and operations.
Namespace
Drupal\Component\Utility
Code
public static function strtoupper($text) { if (static::getStatus() == static::STATUS_MULTIBYTE) { return mb_strtoupper($text); } else { // Use C-locale for ASCII-only uppercase. $text = strtoupper($text); // Case flip Latin-1 accented letters. $text = preg_replace_callback('/\xC3[\xA0-\xB6\xB8-\xBE]/', '\Drupal\Component\Utility\Unicode::caseFlip', $text); return $text; } }
Please login to continue.