You are here

function drupal_strtoupper in Drupal 6

Same name and namespace in other branches
  1. 4 includes/unicode.inc \drupal_strtoupper()
  2. 5 includes/unicode.inc \drupal_strtoupper()
  3. 7 includes/unicode.inc \drupal_strtoupper()

Uppercase a UTF-8 string.

2 calls to 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.
1 string reference to 'drupal_strtoupper'
drupal_html_to_text in includes/mail.inc
Transform an HTML string into plain text, preserving the structure of the markup. Useful for preparing the body of a node to be sent by e-mail.

File

includes/unicode.inc, line 420

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;
  }
}