From d504196b95d2f87f4796b32148579955a3f2caf2 Mon Sep 17 00:00:00 2001 From: Rob Pike Date: Tue, 1 Sep 2009 13:46:59 -0700 Subject: casing operations for byte arrays R=rsc DELTA=186 (181 added, 0 deleted, 5 changed) OCL=34203 CL=34203 --- src/pkg/strings/strings.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/pkg/strings/strings.go') diff --git a/src/pkg/strings/strings.go b/src/pkg/strings/strings.go index eaa6a71a1..f0f076157 100644 --- a/src/pkg/strings/strings.go +++ b/src/pkg/strings/strings.go @@ -149,7 +149,7 @@ func HasSuffix(s, suffix string) bool { } // Map returns a copy of the string s with all its characters modified -// according to mapping function. +// according to the mapping function. func Map(mapping func(rune int) int, s string) string { // In the worst case, the string can grow when mapped, making // things unpleasant. But it's so rare we barge in assuming it's @@ -177,17 +177,17 @@ func Map(mapping func(rune int) int, s string) string { return string(b[0:nbytes]); } -// ToUpper returns a copy of the string s with all letters mapped to their upper case. +// ToUpper returns a copy of the string s with all Unicode letters mapped to their upper case. func ToUpper(s string) string { return Map(unicode.ToUpper, s) } -// ToUpper returns a copy of the string s with all letters mapped to their lower case. +// ToUpper returns a copy of the string s with all Unicode letters mapped to their lower case. func ToLower(s string) string { return Map(unicode.ToLower, s) } -// ToTitle returns a copy of the string s with all letters mapped to their title case. +// ToTitle returns a copy of the string s with all Unicode letters mapped to their title case. func Title(s string) string { return Map(unicode.ToTitle, s) } -- cgit v1.2.3