Commit 7bee8085 authored by Thanabodee Charoenpiriyakij's avatar Thanabodee Charoenpiriyakij Committed by Ian Lance Taylor

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: default avatarIan Lance Taylor <iant@golang.org>
parent b7182acf
......@@ -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
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment