Removes all whitespace characters (spaces, tabs, newlines) from a given string.
The input string from which to remove whitespace.
A new string with all whitespace characters removed.
stripWhitespace(" Hello World "); // "HelloWorld"stripWhitespace("\tExample\nString "); // "ExampleString"stripWhitespace(""); // "" Copy
stripWhitespace(" Hello World "); // "HelloWorld"stripWhitespace("\tExample\nString "); // "ExampleString"stripWhitespace(""); // ""
Removes all whitespace characters (spaces, tabs, newlines) from a given string.