1
0
mirror of https://github.com/golang/go synced 2024-11-05 11:46:12 -07:00

Clarify doc for EqualFold

This commit is contained in:
Andrew Medvedev 2019-09-21 15:46:38 +03:00
parent 6444b5f0bb
commit accc915933
2 changed files with 4 additions and 2 deletions

View File

@ -935,7 +935,8 @@ func ReplaceAll(s, old, new []byte) []byte {
}
// EqualFold reports whether s and t, interpreted as UTF-8 strings,
// are equal under Unicode case folding (case-insensitively).
// are equal under 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 {
// Extract first rune from each.

View File

@ -969,7 +969,8 @@ func ReplaceAll(s, old, new string) string {
}
// EqualFold reports whether s and t, interpreted as UTF-8 strings,
// are equal under Unicode case folding (case-insensitively).
// are equal under Unicode case-folding, which is a more general
// form of case-insensitivity.
func EqualFold(s, t string) bool {
for s != "" && t != "" {
// Extract first rune from each string.