]> Cypherpunks.ru repositories - gostls13.git/commitdiff
strings, bytes: improve the description of simple case-folding in EqualFold
authorhopehook <hopehook.com@gmail.com>
Thu, 7 Apr 2022 15:53:12 +0000 (23:53 +0800)
committerGopher Robot <gobot@golang.org>
Thu, 7 Apr 2022 23:06:24 +0000 (23:06 +0000)
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>

src/bytes/bytes.go
src/strings/strings.go

index d9d502927ee9305bdc075896afb87628efd983d6..979cf1ccf075bcfe71ca0b858ad38286fd416aee 100644 (file)
@@ -1142,7 +1142,7 @@ func ReplaceAll(s, old, new []byte) []byte {
 }
 
 // EqualFold reports whether s and t, interpreted as UTF-8 strings,
-// are equal under Unicode case-folding, which is a more general
+// are equal under simple Unicode case-folding, which is a more general
 // form of case-insensitivity.
 func EqualFold(s, t []byte) bool {
        for len(s) != 0 && len(t) != 0 {
index 74e505338e1e54480b6741234ac5331e4c2503ed..8294f7ec35547c5d7dba9b92c66f16ebfe61669b 100644 (file)
@@ -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.