Question : remove white spaces
Answered by : muhammad-khizar-hayat
"hello world".replace(/\s/g, "");
Source : https://stackoverflow.com/questions/10800355/remove-whitespaces-inside-a-string-in-javascript | Last Update : Sun, 24 Oct 21
Question : Deleting all white spaces in a string
Answered by : rashad
.replaceAll(/\s/g,'')
Source : https://stackoverflow.com/questions/6623231/remove-all-white-spaces-from-text | Last Update : Sun, 28 Nov 21
Question : remove white spaces
Answered by : akash-kumar-h078bu9hbq9s
//Extenion function
fun String.removeWhitespaces() = replace(" ", "")
// Uses
var str = "This is an example text".removeWhitespaces()
println(str)
Source : https://stackoverflow.com/questions/60028103/how-to-remove-all-the-whitespaces-from-a-string-in-kotlin | Last Update : Wed, 04 Aug 21
Question : remove all white spaces and different characters globally
Answered by : ret-tine
str = text.toLowerCase().replace(/[^A-Za-z0-9]/g,'');
Source : https://stackoverflow.com/questions/14813369/palindrome-check-in-javascript | Last Update : Mon, 09 May 22