Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(254)

Issue 1240623002: Add split function to LineSplitter class in dart:convert. (Closed)

Created:
5 years, 5 months ago by Lasse Reichstein Nielsen
Modified:
5 years, 4 months ago
Reviewers:
floitsch, kevmoo
CC:
reviews_dartlang.org
Base URL:
https://github.com/dart-lang/sdk.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Add split function to LineSplitter class in dart:convert. The split function returns a lazy iterable of the lines, unlike the convert function which returns a list. This makes the function usable on large strings where not all of the lines are needed. Closes https://github.com/dart-lang/sdk/issues/23837 R=kevmoo@google.com Committed: https://github.com/dart-lang/sdk/commit/4ee62465568ecad211b37494b3b9d1fd9661435e

Patch Set 1 #

Total comments: 1

Patch Set 2 : Addto changelog #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+181 lines, -45 lines) Patch
M CHANGELOG.md View 1 1 chunk +3 lines, -0 lines 0 comments Download
M sdk/lib/convert/line_splitter.dart View 2 chunks +88 lines, -45 lines 2 comments Download
M tests/lib/convert/line_splitter_test.dart View 2 chunks +90 lines, -0 lines 0 comments Download

Messages

Total messages: 9 (2 generated)
Lasse Reichstein Nielsen
The original was far too complex to begin with. I think this is better.
5 years, 5 months ago (2015-07-14 10:07:28 UTC) #2
Lasse Reichstein Nielsen
https://codereview.chromium.org/1240623002/diff/1/sdk/lib/convert/line_splitter.dart File sdk/lib/convert/line_splitter.dart (right): https://codereview.chromium.org/1240623002/diff/1/sdk/lib/convert/line_splitter.dart#newcode35 sdk/lib/convert/line_splitter.dart:35: int previousChar = char; I could add "previousChar = ...
5 years, 5 months ago (2015-07-14 11:30:50 UTC) #3
kevmoo
I"ll take it. :-) Please update the changelog. LGTM
5 years, 5 months ago (2015-07-14 13:35:35 UTC) #4
kevmoo
On 2015/07/14 13:35:35, kevmoo wrote: > I"ll take it. :-) > > Please update the ...
5 years, 5 months ago (2015-07-14 13:36:23 UTC) #5
Lasse Reichstein Nielsen
Committed patchset #2 (id:20001) manually as 4ee62465568ecad211b37494b3b9d1fd9661435e (presubmit successful).
5 years, 5 months ago (2015-07-15 10:26:29 UTC) #6
floitsch
DBC. https://codereview.chromium.org/1240623002/diff/20001/sdk/lib/convert/line_splitter.dart File sdk/lib/convert/line_splitter.dart (right): https://codereview.chromium.org/1240623002/diff/20001/sdk/lib/convert/line_splitter.dart#newcode30 sdk/lib/convert/line_splitter.dart:30: static Iterable<String> split(String lines, [int start = 0, ...
5 years, 4 months ago (2015-08-20 13:17:41 UTC) #8
Lasse Reichstein Nielsen
5 years, 4 months ago (2015-08-20 14:00:31 UTC) #9
Message was sent while issue was closed.
https://codereview.chromium.org/1240623002/diff/20001/sdk/lib/convert/line_sp...
File sdk/lib/convert/line_splitter.dart (right):

https://codereview.chromium.org/1240623002/diff/20001/sdk/lib/convert/line_sp...
sdk/lib/convert/line_splitter.dart:30: static Iterable<String> split(String
lines, [int start = 0, int end]) sync* {
I'd rather we had added "sync*<int>" like we asked for from the very beginning.

Powered by Google App Engine
This is Rietveld 408576698