vijay
0
Q:

iterating through string golang

package main

import (
	"fmt"
	"strings"
)

func main() {
	words := strings.Fields("This, that, and the other.")
	for i, word := range words {
		fmt.Println(i, " => ", word)
	}
}
0

New to Communities?

Join the community