function public static function Unicode::strtolower

8.x-3.x Unicode.php public static Unicode::strtolower($text)

Converts a UTF-8 string to lowercase.

Parameters

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

Return value

string The string in lowercase.

Deprecated

in bootstrap:8.x-3.22 and is removed from bootstrap:5.0.0. Use mb_strtolower() instead.

Class

Unicode
Extends \Drupal\Component\Utility\Unicode.

Namespace

Drupal\bootstrap\Utility

Source src/Utility/Unicode.php (line 242)

public static function strtolower($text) {
  @trigger_error('\Drupal\bootstrap\Utility\Unicode::strtolower() is deprecated in bootstrap:8.x-3.22 and will be removed before bootstrap:5.0.0. Use mb_strtolower() instead. See https://www.drupal.org/project/bootstrap/issues/3096963.', E_USER_DEPRECATED);
  if (static::getStatus() == static::STATUS_MULTIBYTE) {
    return mb_strtolower($text);
  }
  else {
    // Use C-locale for ASCII-only lowercase.
    $text = strtolower($text);
    // Case flip Latin-1 accented letters.
    $text = preg_replace_callback('/\xC3[\x80-\x96\x98-\x9E]/', '\Drupal\Component\Utility\Unicode::caseFlip', $text);
    return $text;
  }
}