aboutsummaryrefslogtreecommitdiff
path: root/src/strings
diff options
context:
space:
mode:
Diffstat (limited to 'src/strings')
-rw-r--r--src/strings/compare_test.go2
-rw-r--r--src/strings/strings.go10
-rw-r--r--src/strings/strings_test.go2
3 files changed, 7 insertions, 7 deletions
diff --git a/src/strings/compare_test.go b/src/strings/compare_test.go
index 68fc88e143..bc12e421b0 100644
--- a/src/strings/compare_test.go
+++ b/src/strings/compare_test.go
@@ -56,7 +56,7 @@ func TestCompareStrings(t *testing.T) {
a := make([]byte, n+1)
b := make([]byte, n+1)
for len := 0; len < 128; len++ {
- // randomish but deterministic data. No 0 or 255.
+ // randomish but deterministic data. No 0 or 255.
for i := 0; i < len; i++ {
a[i] = byte(1 + 31*i%254)
b[i] = byte(1 + 31*i%254)
diff --git a/src/strings/strings.go b/src/strings/strings.go
index 37d5647ffd..c24c77b9dd 100644
--- a/src/strings/strings.go
+++ b/src/strings/strings.go
@@ -346,7 +346,7 @@ func FieldsFunc(s string, f func(rune) bool) []string {
return a
}
-// Join concatenates the elements of a to create a single string. The separator string
+// Join concatenates the elements of a to create a single string. The separator string
// sep is placed between elements in the resulting string.
func Join(a []string, sep string) string {
if len(a) == 0 {
@@ -384,8 +384,8 @@ func HasSuffix(s, suffix string) bool {
// dropped from the string with no replacement.
func Map(mapping func(rune) rune, 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
- // fine. It could also shrink but that falls out naturally.
+ // things unpleasant. But it's so rare we barge in assuming it's
+ // fine. It could also shrink but that falls out naturally.
maxbytes := len(s) // length of b
nbytes := 0 // number of bytes encoded in b
// The output buffer b is initialized on demand, the first
@@ -714,7 +714,7 @@ func EqualFold(s, t string) bool {
return false
}
- // General case. SimpleFold(x) returns the next equivalent rune > x
+ // General case. SimpleFold(x) returns the next equivalent rune > x
// or wraps around to smaller values.
r := unicode.SimpleFold(sr)
for r != sr && r < tr {
@@ -726,6 +726,6 @@ func EqualFold(s, t string) bool {
return false
}
- // One string is empty. Are both?
+ // One string is empty. Are both?
return s == t
}
diff --git a/src/strings/strings_test.go b/src/strings/strings_test.go
index 49f55fe38c..0572adbdd9 100644
--- a/src/strings/strings_test.go
+++ b/src/strings/strings_test.go
@@ -492,7 +492,7 @@ func rot13(r rune) rune {
func TestMap(t *testing.T) {
// Run a couple of awful growth/shrinkage tests
a := tenRunes('a')
- // 1. Grow. This triggers two reallocations in Map.
+ // 1. Grow. This triggers two reallocations in Map.
maxRune := func(rune) rune { return unicode.MaxRune }
m := Map(maxRune, a)
expect := tenRunes(unicode.MaxRune)