mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
all: use "reports whether" in place of "returns true if(f)"
Comment changes only. Change-Id: I56848814564c4aa0988b451df18bebdfc88d6d94 Reviewed-on: https://go-review.googlesource.com/7721 Reviewed-by: Rob Pike <r@golang.org>
This commit is contained in:
parent
fcb895feef
commit
2adc4e8927
47 changed files with 100 additions and 102 deletions
|
|
@ -126,17 +126,17 @@ func Count(s, sep string) int {
|
|||
return n
|
||||
}
|
||||
|
||||
// Contains returns true if substr is within s.
|
||||
// Contains reports whether substr is within s.
|
||||
func Contains(s, substr string) bool {
|
||||
return Index(s, substr) >= 0
|
||||
}
|
||||
|
||||
// ContainsAny returns true if any Unicode code points in chars are within s.
|
||||
// ContainsAny reports whether any Unicode code points in chars are within s.
|
||||
func ContainsAny(s, chars string) bool {
|
||||
return IndexAny(s, chars) >= 0
|
||||
}
|
||||
|
||||
// ContainsRune returns true if the Unicode code point r is within s.
|
||||
// ContainsRune reports whether the Unicode code point r is within s.
|
||||
func ContainsRune(s string, r rune) bool {
|
||||
return IndexRune(s, r) >= 0
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue