function drupal_strtoupper
drupal_strtoupper($text)
Uppercase a UTF-8 string.
Parameters
$text: The string to run the operation on.
Return value
string The string in uppercase.
Related topics
File
- includes/unicode.inc, line 501
- Provides Unicode-related conversions and operations.
Code
function drupal_strtoupper($text) { global $multibyte; if ($multibyte == UNICODE_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]/', '_unicode_caseflip', $text); return $text; } }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/includes!unicode.inc/function/drupal_strtoupper/7.x