func Fields(s string) []string
package main
import (
"fmt"
"strings"
)
func main() {
fmt.Printf("Fields are: %q\n", strings.Fields(" foo bar baz "))
fmt.Printf("Fields are: %q\n", strings.Fields(" "))
fmt.Printf("Fields are: %q\n", strings.Fields(""))
}
// Output:
// Fields are: ["foo" "bar" "baz"]
// Fields are: []
// Fields are: []