public static function Unicode::strtoupper

Uppercase a UTF-8 string.

Parameters

string $text: The string to run the operation on.

Return value

string The string in uppercase.

4 calls to Unicode::strtoupper()
drupal_strtoupper in drupal/core/includes/unicode.inc
Uppercase a UTF-8 string.
GlossaryTest::testGlossaryView in drupal/core/modules/views/lib/Drupal/views/Tests/GlossaryTest.php
Tests the default glossary view.
Unicode::ucfirst in drupal/core/lib/Drupal/Component/Utility/Unicode.php
Capitalizes the first letter of a UTF-8 string.
UnicodeTest::testStrtoupper in drupal/core/tests/Drupal/Tests/Component/Utility/UnicodeTest.php
Tests Unicode::strtoupper().

File

drupal/core/lib/Drupal/Component/Utility/Unicode.php, line 269
Contains \Drupal\Component\Utility\Unicode.

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