lowerCaseFirstChar method

String lowerCaseFirstChar()

Converts the first character of the string to lowercase, leaving the rest of the string unchanged.

If the string is empty, it returns an empty string.

Returns: A new string with the first character in lowercase, or an empty string if the original string is empty.

Example:

'MixedCase'.lowerCaseFirstChar(); // Returns 'mixedCase'
'lowercase'.lowerCaseFirstChar(); // Returns 'lowercase'
''.lowerCaseFirstChar();        // Returns ''

Implementation

String lowerCaseFirstChar() => isEmpty ? '' : this[0].toLowerCase() + substring(1);