toLowerCase

Converts all characters in the str to lowercase.

Usage Scenarios

  • Text Normalization: In text processing, standardize the case of strings for comparison.
  • Data Cleaning: Clean data by converting all strings to lowercase.

Example

import { toLowerCase } from 'funtool/string'

toLowerCase('HELLO') // => 'hello' ✅
toLowerCase(123) // => '123' ✅

Signature

function toLowerCase(str: string): string

Parameters

  • str ( string ): The input string.

Returns

  • ( string ): A new string with all characters in lowercase.