Change-Id: I994f003c97a14d194df5f07dd217c0ff3b214741
Reviewed-on: https://go-review.googlesource.com/48874
Reviewed-by: Matt Layher <mdlayher@gmail.com>
Run-TryBot: Matt Layher <mdlayher@gmail.com>
// false
}
+func ExampleContainsRune() {
+ // Finds whether a string contains a particular Unicode code point.
+ // The code point for the lowercase letter "a", for example, is 97.
+ fmt.Println(strings.ContainsRune("aardvark", 97))
+ fmt.Println(strings.ContainsRune("timeout", 97))
+ // Output:
+ // true
+ // false
+}
+
func ExampleCount() {
fmt.Println(strings.Count("cheese", "e"))
fmt.Println(strings.Count("five", "")) // before & after each rune