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

Issue 736583008: Make Utf8Decoder and Utf8Encoder's convert methods take start and end too. (Closed)

Created:
6 years, 1 month ago by Lasse Reichstein Nielsen
Modified:
6 years, 1 month ago
Reviewers:
Søren Gjesse, floitsch
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Make Utf8Decoder and Utf8Encoder's convert methods take start and end too. BUG= http://dartbug.com/21652 R=floitsch@google.com, sgjesse@google.com Committed: https://code.google.com/p/dart/source/detail?r=41844

Patch Set 1 #

Total comments: 4

Patch Set 2 : Update documentation. #

Patch Set 3 : Make UTF8.encoder/decoder return types be Utf8Encoder,Utf8Decoder, not just Converter<..> #

Total comments: 2

Patch Set 4 : Add start/end support on ASCII/Latin-1 encoder and decoder. #

Total comments: 5

Patch Set 5 : Add documentation for new parameters. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+203 lines, -25 lines) Patch
M sdk/lib/convert/ascii.dart View 1 2 3 4 3 chunks +46 lines, -12 lines 0 comments Download
M sdk/lib/convert/utf.dart View 1 2 3 chunks +40 lines, -11 lines 0 comments Download
M tests/lib/convert/ascii_test.dart View 1 2 3 1 chunk +22 lines, -0 lines 0 comments Download
M tests/lib/convert/latin1_test.dart View 1 2 3 1 chunk +22 lines, -0 lines 0 comments Download
M tests/lib/convert/utf8_encode_test.dart View 1 chunk +44 lines, -1 line 0 comments Download
M tests/lib/convert/utf8_test.dart View 1 chunk +29 lines, -1 line 0 comments Download

Messages

Total messages: 13 (1 generated)
Lasse Reichstein Nielsen
I only added the extra arguments to the convert methods of the decoder/encoder, not to ...
6 years, 1 month ago (2014-11-19 13:14:25 UTC) #2
floitsch
LGTM, although I'm not 100% convinced that a start/end is really useful. But apparently users ...
6 years, 1 month ago (2014-11-19 13:19:58 UTC) #3
Lasse Reichstein Nielsen
https://codereview.chromium.org/736583008/diff/1/sdk/lib/convert/utf.dart File sdk/lib/convert/utf.dart (right): https://codereview.chromium.org/736583008/diff/1/sdk/lib/convert/utf.dart#newcode87 sdk/lib/convert/utf.dart:87: List<int> convert(String string, [int start = 0, int end]) ...
6 years, 1 month ago (2014-11-19 13:25:00 UTC) #4
floitsch
On 2014/11/19 13:25:00, Lasse Reichstein Nielsen wrote: > https://codereview.chromium.org/736583008/diff/1/sdk/lib/convert/utf.dart > File sdk/lib/convert/utf.dart (right): > > ...
6 years, 1 month ago (2014-11-19 13:41:25 UTC) #5
floitsch
On 2014/11/19 13:41:25, floitsch wrote: > On 2014/11/19 13:25:00, Lasse Reichstein Nielsen wrote: > > ...
6 years, 1 month ago (2014-11-19 13:41:36 UTC) #6
Søren Gjesse
lgtm https://codereview.chromium.org/736583008/diff/40001/sdk/lib/convert/utf.dart File sdk/lib/convert/utf.dart (right): https://codereview.chromium.org/736583008/diff/40001/sdk/lib/convert/utf.dart#newcode90 sdk/lib/convert/utf.dart:90: List<int> convert(String string, [int start = 0, int ...
6 years, 1 month ago (2014-11-19 13:53:28 UTC) #7
Lasse Reichstein Nielsen
On 2014/11/19 13:41:36, floitsch wrote: > On 2014/11/19 13:41:25, floitsch wrote: > > On 2014/11/19 ...
6 years, 1 month ago (2014-11-19 14:00:20 UTC) #8
floitsch
On 2014/11/19 14:00:20, Lasse Reichstein Nielsen wrote: > On 2014/11/19 13:41:36, floitsch wrote: > > ...
6 years, 1 month ago (2014-11-19 14:43:28 UTC) #9
Lasse Reichstein Nielsen
Also changed ASCII, Latin-1. PTAL
6 years, 1 month ago (2014-11-20 08:26:55 UTC) #10
Søren Gjesse
lgtm, with comments https://codereview.chromium.org/736583008/diff/60001/sdk/lib/convert/ascii.dart File sdk/lib/convert/ascii.dart (right): https://codereview.chromium.org/736583008/diff/60001/sdk/lib/convert/ascii.dart#newcode77 sdk/lib/convert/ascii.dart:77: List<int> convert(String string, [int start = ...
6 years, 1 month ago (2014-11-20 10:41:41 UTC) #11
Lasse Reichstein Nielsen
Committed patchset #5 (id:80001) manually as 41844 (presubmit successful).
6 years, 1 month ago (2014-11-20 11:24:07 UTC) #12
Lasse Reichstein Nielsen
6 years, 1 month ago (2014-11-20 12:46:22 UTC) #13
Message was sent while issue was closed.
https://codereview.chromium.org/736583008/diff/60001/sdk/lib/convert/ascii.dart
File sdk/lib/convert/ascii.dart (right):

https://codereview.chromium.org/736583008/diff/60001/sdk/lib/convert/ascii.da...
sdk/lib/convert/ascii.dart:77: List<int> convert(String string, [int start = 0,
int end]) {
Ack, documenting.

https://codereview.chromium.org/736583008/diff/60001/sdk/lib/convert/ascii.da...
sdk/lib/convert/ascii.dart:78: int stringLength = string.length;
Funny you should say that - I'm already doing that in another CL :)

Powered by Google App Engine
This is Rietveld 408576698