str := “The quick brown fox jumps over the lazy dog”
sl := strings.Fields(str)
fmt.Printf(“Splitted in slice: %v\n”, sl)
for _, val := range sl {
fmt.Printf(“%s - “, val)
}
fmt.Println()
Splitted in slice: [The quick brown fox jumps over the lazy dog]
The - quick - brown - fox - jumps - over - the - lazy - dog -