Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1976)

Issue 4657050: code review 4657050: strings, bytes: Introducing shortuct splitting functions.

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 10 months ago by vk
Modified:
12 years, 10 months ago
CC:
golang-dev
Visibility:
Public.

Description

strings, bytes: Introducing shortuct splitting functions. The semantic of the third argument of Split and SplitAfter functions can be confusing in the case of negative value. I added two shortcut functions SplitAll and SplitAfterAll that clearly claim their intent. Meanwhile, I fixed a little typo in the SplitAfter documentation.

Patch Set 1 #

Patch Set 2 : diff -r d847323c0fbf https://go.googlecode.com/hg/ #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+82 lines, -2 lines) Patch
M src/pkg/bytes/bytes.go View 1 2 chunks +15 lines, -1 line 0 comments Download
M src/pkg/bytes/bytes_test.go View 1 2 chunks +26 lines, -0 lines 0 comments Download
M src/pkg/strings/strings.go View 1 2 chunks +15 lines, -1 line 2 comments Download
M src/pkg/strings/strings_test.go View 1 2 chunks +26 lines, -0 lines 1 comment Download

Messages

Total messages: 12
vk
Hello golang-dev@googlegroups.com (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://go.googlecode.com/hg/
12 years, 10 months ago (2011-06-25 21:41:33 UTC) #1
r
I'm not happy with adding lots of one-line helper functions to the library. They add ...
12 years, 10 months ago (2011-06-25 22:11:06 UTC) #2
r
http://codereview.appspot.com/4657050/diff/2001/src/pkg/strings/strings.go File src/pkg/strings/strings.go (right): http://codereview.appspot.com/4657050/diff/2001/src/pkg/strings/strings.go#newcode227 src/pkg/strings/strings.go:227: // SplitAfterAll slices s into substrings after each instance ...
12 years, 10 months ago (2011-06-25 22:16:18 UTC) #3
r
http://codereview.appspot.com/4657050/diff/2001/src/pkg/strings/strings.go File src/pkg/strings/strings.go (right): http://codereview.appspot.com/4657050/diff/2001/src/pkg/strings/strings.go#newcode227 src/pkg/strings/strings.go:227: // SplitAfterAll slices s into substrings after each instance ...
12 years, 10 months ago (2011-06-25 23:23:14 UTC) #4
jan_mercl
On 2011/06/25 22:11:06, r wrote: > I'm not happy with adding lots of one-line helper ...
12 years, 10 months ago (2011-06-26 08:52:46 UTC) #5
vk
Hi, My first intent was to get rid of the IMO ugly -1 parameter that ...
12 years, 10 months ago (2011-06-26 19:09:00 UTC) #6
cainetighe
yes, you can just make more changes based on feedback and then run "hg mail" ...
12 years, 10 months ago (2011-06-26 21:44:43 UTC) #7
adg
On 26 June 2011 08:16, <r@golang.org> wrote: > > http://codereview.appspot.com/4657050/diff/2001/src/pkg/strings/strings.go > File src/pkg/strings/strings.go (right): > ...
12 years, 10 months ago (2011-06-27 01:08:05 UTC) #8
dsymonds
This discussion gives me flashbacks. http://code.google.com/p/go/source/detail?r=e23ff864e1ae Wow, almost exactly two years ago!
12 years, 10 months ago (2011-06-27 01:14:59 UTC) #9
r2
On Jun 27, 2011, at 11:07 AM, Andrew Gerrand wrote: > On 26 June 2011 ...
12 years, 10 months ago (2011-06-27 01:30:11 UTC) #10
rog
If this is to happen, I think I'd prefer the current functions to be renamed ...
12 years, 10 months ago (2011-06-27 07:04:59 UTC) #11
adg
12 years, 10 months ago (2011-06-27 07:07:34 UTC) #12
On 27 June 2011 17:04, roger peppe <rogpeppe@gmail.com> wrote:
> If this is to happen, I think I'd prefer the current functions to be renamed
> SplitN and SplitAfterN, so that we could keep the current names for the more
> common case of splitting all.

rog: http://codereview.appspot.com/4661051/
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b