Skip to content

Instantly share code, notes, and snippets.

@chespinoza
Last active December 20, 2015 03:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chespinoza/6068038 to your computer and use it in GitHub Desktop.
Save chespinoza/6068038 to your computer and use it in GitHub Desktop.
Parse a string using blank spaces with Go
package main
import "fmt"
import "strings"
func main() {
someString := "one two three four "
words := strings.Fields(someString)
fmt.Println(words, len(words))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment