diff options
author | Robert Griesemer <gri@golang.org> | 2009-11-06 14:24:38 -0800 |
---|---|---|
committer | Robert Griesemer <gri@golang.org> | 2009-11-06 14:24:38 -0800 |
commit | 828334dd95ce8e4bf3662bd5c89d7c417f0741d0 (patch) | |
tree | fd7e0c9961bc3af2ddf105e9cc1943f2509ac584 /src/pkg/bytes/bytes.go | |
parent | eb5cdfd67ff6d32df4c4c27840eaee027c5e3512 (diff) | |
download | golang-828334dd95ce8e4bf3662bd5c89d7c417f0741d0.tar.gz |
- fine-tuning of one-line func heuristic (nodes.go)
- enabled for function declarations (not just function literals)
- applied gofmt -w $GOROOT/src
(look for instance at src/pkg/debug/elf/elf.go)
R=r, rsc
CC=go-dev
http://go/go-review/1026006
Diffstat (limited to 'src/pkg/bytes/bytes.go')
-rw-r--r-- | src/pkg/bytes/bytes.go | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/src/pkg/bytes/bytes.go b/src/pkg/bytes/bytes.go index 05d87fcb6..3ebc8373a 100644 --- a/src/pkg/bytes/bytes.go +++ b/src/pkg/bytes/bytes.go @@ -155,9 +155,7 @@ func genSplit(s, sep []byte, sepSave, n int) [][]byte { // Split splits the array s around each instance of sep, returning an array of subarrays of s. // If sep is empty, Split splits s after each UTF-8 sequence. // If n > 0, Split splits s into at most n subarrays; the last subarray will contain an unsplit remainder. -func Split(s, sep []byte, n int) [][]byte { - return genSplit(s, sep, 0, n); -} +func Split(s, sep []byte, n int) [][]byte { return genSplit(s, sep, 0, n) } // SplitAfter splits the array s after each instance of sep, returning an array of subarrays of s. // If sep is empty, SplitAfter splits s after each UTF-8 sequence. @@ -244,19 +242,13 @@ func Map(mapping func(rune int) int, s []byte) []byte { } // ToUpper returns a copy of the byte array s with all Unicode letters mapped to their upper case. -func ToUpper(s []byte) []byte { - return Map(unicode.ToUpper, s); -} +func ToUpper(s []byte) []byte { return Map(unicode.ToUpper, s) } // ToUpper returns a copy of the byte array s with all Unicode letters mapped to their lower case. -func ToLower(s []byte) []byte { - return Map(unicode.ToLower, s); -} +func ToLower(s []byte) []byte { return Map(unicode.ToLower, s) } // ToTitle returns a copy of the byte array s with all Unicode letters mapped to their title case. -func ToTitle(s []byte) []byte { - return Map(unicode.ToTitle, s); -} +func ToTitle(s []byte) []byte { return Map(unicode.ToTitle, s) } // Trim returns a slice of the string s, with all leading and trailing white space // removed, as defined by Unicode. |