Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Unicode.php

function 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.

Related topics

PHP wrapper functions
Functions that are wrappers or custom implementations of PHP functions.

File

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

Class

Unicode
Provides Unicode-related conversions and operations.

Namespace

Drupal\Component\Utility

Code

public static function lcfirst($text) {
    // Note: no mbstring equivalent!
    return mb_strtolower(mb_substr($text, 0, 1)) . mb_substr($text, 1);
}
RSS feed
Powered by Drupal