Answers for "go remove whitespace from string"

Go
0

go remove whitespace from string

randomString := "  hello      this is a test"
fmt.Println(strings.Replace(randomString, " ", "", -1))

>hellothisisatest
Posted by: Guest on December-04-2020

Code answers related to "go remove whitespace from string"

Browse Popular Code Answers by Language