Eliminar espacios blancos
"hello world".replace(/\s/g, "");
code fighter
"hello world".replace(/\s/g, "");
.replaceAll(/\s/g,'')
name = name.strip()
//Extenion function
fun String.removeWhitespaces() = replace(" ", "")
// Uses
var str = "This is an example text".removeWhitespaces()
println(str)