aboutsummaryrefslogtreecommitdiff
path: root/src/strings
diff options
context:
space:
mode:
authorМаксадбек Ахмедов <a.maksadbek@gmail.com>2019-04-13 17:38:36 +0300
committerBrad Fitzpatrick <bradfitz@golang.org>2019-04-14 16:19:31 +0000
commita01d108e30a00f9126253e061d679b07d9ff72b7 (patch)
tree4ffd678c74581f1e70569176857970d86fdaef16 /src/strings
parenta6e892d26d6ee59799f55bc50521605ebf75ea67 (diff)
downloadgo-a01d108e30a00f9126253e061d679b07d9ff72b7.tar.gz
go-a01d108e30a00f9126253e061d679b07d9ff72b7.zip
strings: remove "a copy of the string" from ToUpper/ToLower comments
When string letters are all in lower/upper cases, both functions respectively return original string. Fixes #30987 Change-Id: Ie8d664f7af5e087f82c1bc156933e9a995645bf4 Reviewed-on: https://go-review.googlesource.com/c/go/+/171735 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'src/strings')
-rw-r--r--src/strings/strings.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/strings/strings.go b/src/strings/strings.go
index 1805a14bd2..e3fdd9feaf 100644
--- a/src/strings/strings.go
+++ b/src/strings/strings.go
@@ -550,7 +550,7 @@ func Repeat(s string, count int) string {
return b.String()
}
-// ToUpper returns a copy of the string s with all Unicode letters mapped to their upper case.
+// ToUpper returns s with all Unicode letters mapped to their upper case.
func ToUpper(s string) string {
isASCII, hasLower := true, false
for i := 0; i < len(s); i++ {
@@ -580,7 +580,7 @@ func ToUpper(s string) string {
return Map(unicode.ToUpper, s)
}
-// ToLower returns a copy of the string s with all Unicode letters mapped to their lower case.
+// ToLower returns s with all Unicode letters mapped to their lower case.
func ToLower(s string) string {
isASCII, hasUpper := true, false
for i := 0; i < len(s); i++ {