Tokenize a string: Difference between revisions

Content added Content deleted
(Fix UnixPipes for inputs like "many spaces,in string". Fit bash example in 80 columns. Two examples work with Bourne Shell, and bash example works also with pdksh.)
(→‎{{header|Go}}: small update for library change)
Line 512: Line 512:
func main() {
func main() {
s := "Hello,How,Are,You,Today"
s := "Hello,How,Are,You,Today"
fmt.Println(strings.Join(strings.Split(s, ",", -1), "."))
fmt.Println(strings.Join(strings.Split(s, ","), "."))
}</lang>
}</lang>