ts-utils
  • Getting Started
  • Contributing
  • Testing
  • Functions
    • Array Methods
      • isArr
      • isArrEmpty
      • pushUniqueValue
      • pushOrUpdate
    • Date Methods
      • toNow
      • formatDate
      • fromNow
    • Number Methods
      • toFixed
      • parseNumber
      • parseFormat
      • addUnit
      • addSeparators
      • formatNumber
      • ensureNumber
      • numberEmptyState
    • Object Methods
      • parseJSON
      • deepClone
      • parseNumValues
      • removeEmptyKeys
      • sanitizeQuery
      • removeKeys
      • renameKey
      • renameKeys
      • sortByKeyLength
      • querylize
      • parseNumericObj
      • reserveKeys
      • hasKeysAndValues
    • String Methods
      • randomStr
      • toUpperCase
      • toLowerCase
      • toFullUrl
      • initials
      • generateUuid
Powered by GitBook
On this page
  • toLowerCase(str)
  • Arguments
  • Returns
  • Example
  • Usage
  • Notes

Was this helpful?

  1. Functions
  2. String Methods

toLowerCase

toLowerCase(str)

Converts a string to lowercase. This function serves as a wrapper around the built-in toLowerCase() method of the String object.

Arguments

  • str (string): The input string to convert to lowercase.

Returns

  • string: The input string converted to lowercase.

Example

typescript
import { toLowerCase } from 'check-engineering/ts-utils';

const originalString = "Hello, World!";
const lowercaseString = toLowerCase(originalString); // => "hello, world!"

Usage

typescript
import { toLowerCase } from 'check-engineering/ts-utils';

const message = "THIS IS A MESSAGE";
const lowercaseMessage = toLowerCase(message); // => "this is a message"

Notes

  • The toLowerCase function is a utility that converts a string to lowercase.

  • It provides a convenient way to ensure consistent casing in strings without directly invoking the toLowerCase() method.

  • This function can be beneficial for standardizing the case of strings for comparison or display purposes.

PrevioustoUpperCaseNexttoFullUrl

Last updated 11 months ago

Was this helpful?