1
0
mirror of https://github.com/golang/go synced 2024-11-19 17:14:44 -07:00

strings: add Fields example

R=golang-dev, rsc, r
CC=golang-dev
https://golang.org/cl/5629043
This commit is contained in:
Brad Fitzpatrick 2012-02-03 11:17:55 -08:00
parent a044154a4c
commit 10f1b6a074

View File

@ -0,0 +1,15 @@
// Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package strings_test
import (
"fmt"
"strings"
)
// Fields are: ["foo" "bar" "baz"]
func ExampleFields() {
fmt.Printf("Fields are: %q", strings.Fields(" foo bar baz "))
}