fmt: add example for Sprint

Updates #27376

Change-Id: I9ce6541a95b5ecd13f3932558427de1f597df07a
Reviewed-on: https://go-review.googlesource.com/134036
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
Thanabodee Charoenpiriyakij 2018-09-07 19:02:51 +07:00 committed by Ian Lance Taylor
parent b7182acf61
commit 7bee8085da
1 changed files with 9 additions and 0 deletions

View File

@ -122,3 +122,12 @@ func ExampleFscanln() {
// 3: dmr, 1771, 1.618034
// 3: ken, 271828, 3.141590
}
func ExampleSprint() {
s := fmt.Sprint("there", "are", "99", "gophers")
fmt.Println(s)
fmt.Println(len(s))
// Output:
// thereare99gophers
// 17
}