Answers for "remove white spaces in a string"

CSS
0

Deleting all white spaces in a string

.replaceAll(/\s/g,'')
Posted by: Guest on November-21-2021
0

remove whitespaces

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

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

println(str)
Posted by: Guest on July-28-2021

Code answers related to "remove white spaces in a string"

Browse Popular Code Answers by Language