Remove Whitespace

Removes all whitespace from a string.

CategoryStrings
AuthorPol Gubau
Since1.0.0
Last Updated2025-03-15
TypeSync
CompatibilityUniversal

Example

  • Input

    removeWhitespace(' hello world ')

    Output:

    'helloworld'

Return

Returns the string without any whitespace.

Type: string

Props

NameTypeDefaultRequiredDescription
strstringnullYesThe string to remove whitespace from.

Notes

This function removes all types of whitespace characters (spaces, tabs, etc.) from the string.

Tags

  • string
  • whitespace
  • removal

Related