diff options
author | Andrew Medvedev <andrew.y.medvedev@gmail.com> | 2019-09-21 12:47:34 +0000 |
---|---|---|
committer | Rob Pike <r@golang.org> | 2019-09-21 21:45:58 +0000 |
commit | 78e5288b5c720d996ea5132f1fa0348968ff0513 (patch) | |
tree | 87d123b1a07f219b3fbc9d732bb7096e721efe37 /src/bytes | |
parent | 9c0e56bf9de5ff8faa73860ab6bb43562722c18f (diff) | |
download | go-78e5288b5c720d996ea5132f1fa0348968ff0513.tar.gz go-78e5288b5c720d996ea5132f1fa0348968ff0513.zip |
strings, bytes: clarify usage of EqualFolds
This clarifies meaning of "case folding" Unicode equality with more familiar "case insensitive" wording.
For case folding properties see ftp://ftp.unicode.org/Public/UNIDATA/CaseFolding.txt.
Fixes #33447
Change-Id: I6ee85ab398679bf2a0b7d18693985ff0979d6c5a
GitHub-Last-Rev: accc9159330c61e046d77f77beac62b38bf72c19
GitHub-Pull-Request: golang/go#34434
Reviewed-on: https://go-review.googlesource.com/c/go/+/196717
Reviewed-by: Rob Pike <r@golang.org>
Diffstat (limited to 'src/bytes')
-rw-r--r-- | src/bytes/bytes.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/bytes/bytes.go b/src/bytes/bytes.go index eb13212384..e872cc2050 100644 --- a/src/bytes/bytes.go +++ b/src/bytes/bytes.go @@ -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. +// 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. |