Commit 860484a1 authored by Ankit Goyal's avatar Ankit Goyal Committed by Brad Fitzpatrick

strconv: add example for IsGraphic

Change-Id: I58ba1f5d5c942d6a345c19df1bca80b63fb5abf5
Reviewed-on: https://go-review.googlesource.com/132777Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
parent 317afdc3
......@@ -167,6 +167,22 @@ func ExampleFormatUint() {
// string, 2a
}
func ExampleIsGraphic() {
shamrock := strconv.IsGraphic('☘')
fmt.Println(shamrock)
a := strconv.IsGraphic('a')
fmt.Println(a)
bel := strconv.IsGraphic('\007')
fmt.Println(bel)
// Output:
// true
// true
// false
}
func ExampleIsPrint() {
c := strconv.IsPrint('\u263a')
fmt.Println(c)
......
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