function Unicode::strtoupper

Converts a UTF-8 string to uppercase.

Parameters

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

Return value

string The string in uppercase.

Deprecated

in drupal:8.6.0 and is removed from drupal:9.0.0. Use mb_strtoupper() instead.

See also

https://www.drupal.org/node/2850048

1 call to Unicode::strtoupper()
UnicodeTest::testStrtoupper in core/tests/Drupal/Tests/Component/Utility/UnicodeTest.php
Tests multibyte strtoupper.

File

core/lib/Drupal/Component/Utility/Unicode.php, line 288

Class

Unicode
Provides Unicode-related conversions and operations.

Namespace

Drupal\Component\Utility

Code

public static function strtoupper($text) {
    @trigger_error('\\Drupal\\Component\\Utility\\Unicode::strtoupper() is deprecated in Drupal 8.6.0 and will be removed before Drupal 9.0.0. Use mb_strtoupper() instead. See https://www.drupal.org/node/2850048.', E_USER_DEPRECATED);
    return mb_strtoupper($text);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.