mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
strings, bytes: improve the description of simple case-folding in EqualFold
This CL removes the problem description pointed out by @bjkail. Second, synchronously modify the comments of the bytes package. Updates #52022 Fixes #52204 Change-Id: I0aa52c774f40bb91f32bebdd2a62a11067a77be0 Reviewed-on: https://go-review.googlesource.com/c/go/+/398736 Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> Auto-Submit: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> Trust: Cherry Mui <cherryyz@google.com>
This commit is contained in:
parent
8d581f589e
commit
c451a02a6d
2 changed files with 1 additions and 3 deletions
|
|
@ -1043,8 +1043,6 @@ func ReplaceAll(s, old, new string) string {
|
|||
// EqualFold reports whether s and t, interpreted as UTF-8 strings,
|
||||
// are equal under simple Unicode case-folding, which is a more general
|
||||
// form of case-insensitivity.
|
||||
//
|
||||
// EqualFold(s, t) is equivalent to Tolower(s) == Tolower(t).
|
||||
func EqualFold(s, t string) bool {
|
||||
for s != "" && t != "" {
|
||||
// Extract first rune from each string.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue