summaryrefslogtreecommitdiff
path: root/src/pkg/strings
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2011-09-26 19:35:32 -0400
committerRuss Cox <rsc@golang.org>2011-09-26 19:35:32 -0400
commitde96885c885cd5c8750a14313bfc3ed2a6274928 (patch)
tree88e937140942c5c4083a2b47254aaa1eea8abbfd /src/pkg/strings
parentca2e62225e091affc59bf49e867438f490fcd839 (diff)
downloadgo-de96885c885cd5c8750a14313bfc3ed2a6274928.tar.gz
bytes: add EqualFold
R=golang-dev, r, r CC=golang-dev http://codereview.appspot.com/5123047
Diffstat (limited to 'src/pkg/strings')
-rw-r--r--src/pkg/strings/strings.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/pkg/strings/strings.go b/src/pkg/strings/strings.go
index 446fa3a0c..58301febd 100644
--- a/src/pkg/strings/strings.go
+++ b/src/pkg/strings/strings.go
@@ -584,7 +584,8 @@ func Replace(s, old, new string, n int) string {
return string(t[0:w])
}
-// EqualFold returns true if s and t are equal under Unicode case-folding.
+// EqualFold reports whether s and t, interpreted as UTF-8 strings,
+// are equal under Unicode case-folding.
func EqualFold(s, t string) bool {
for s != "" && t != "" {
// Extract first rune from each string.