drupal_strtoupper

Versions
4.7 – 7
drupal_strtoupper($text)

Uppercase a UTF-8 string.

▾ 2 functions call drupal_strtoupper()

drupal_ucfirst in includes/unicode.inc
Capitalize the first letter of a UTF-8 string.
tablesort_sql in includes/tablesort.inc
Create an SQL sort clause.

Code

includes/unicode.inc, line 380

<?php
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;
  }
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.