alex
0
Q:

golang string split

s := strings.Split("a,b,c", ",")
1
someString := "one    two   three four "

words := strings.Fields(someString)

fmt.Println(words, len(words)) // [one two three four] 4
1

New to Communities?

Join the community