Hapus Whitespace

//Extenion function
fun String.removeWhitespaces() = replace(" ", "")

// Uses
var str = "This is an example text".removeWhitespaces()

println(str)
Silly Seal