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:
hopehook 2022-04-07 23:53:12 +08:00 committed by Gopher Robot
parent 8d581f589e
commit c451a02a6d
2 changed files with 1 additions and 3 deletions

View 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.