You are here

public static function Unicode::lcfirst in Service Container 7.2

Same name and namespace in other branches
  1. 7 lib/Drupal/Component/Utility/Unicode.php \Drupal\Component\Utility\Unicode::lcfirst()

Converts the first character of a UTF-8 string to lowercase.

Parameters

string $text: The string that will be converted.

Return value

string The string with the first character as lowercase.

File

lib/Drupal/Component/Utility/Unicode.php, line 366
Contains \Drupal\Component\Utility\Unicode.

Class

Unicode
Provides Unicode-related conversions and operations.

Namespace

Drupal\Component\Utility

Code

public static function lcfirst($text) {

  // Note: no mbstring equivalent!
  return static::strtolower(static::substr($text, 0, 1)) . static::substr($text, 1);
}