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

Issue 949753005: Add String.replaceRange and use it in replaceFirst{,Mapped}. (Closed)

Created:
5 years, 10 months ago by Lasse Reichstein Nielsen
Modified:
5 years, 10 months ago
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Add String.replaceRange and use it in replaceFirst{,Mapped}. R=floitsch@google.com Committed: https://code.google.com/p/dart/source/detail?r=44022

Patch Set 1 #

Patch Set 2 : Move "copy-one-byte-string-to-result" to helper method. #

Total comments: 5

Patch Set 3 : Address comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+95 lines, -23 lines) Patch
M runtime/lib/string_patch.dart View 1 2 3 chunks +40 lines, -20 lines 0 comments Download
M sdk/lib/_internal/compiler/js_lib/interceptors.dart View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M sdk/lib/_internal/compiler/js_lib/js_string.dart View 1 2 1 chunk +8 lines, -0 lines 0 comments Download
M sdk/lib/_internal/compiler/js_lib/string_helper.dart View 1 2 3 chunks +10 lines, -3 lines 0 comments Download
M sdk/lib/core/string.dart View 1 2 1 chunk +13 lines, -0 lines 0 comments Download
M tests/corelib/string_replace_test.dart View 1 2 1 chunk +23 lines, -0 lines 0 comments Download

Messages

Total messages: 11 (3 generated)
Lasse Reichstein Nielsen
Seems like useful functionality since we implemented it twice already.
5 years, 10 months ago (2015-02-23 10:05:46 UTC) #2
floitsch
LGTM.
5 years, 10 months ago (2015-02-23 14:34:17 UTC) #3
floitsch
https://chromiumcodereview.appspot.com/949753005/diff/20001/sdk/lib/core/string.dart File sdk/lib/core/string.dart (right): https://chromiumcodereview.appspot.com/949753005/diff/20001/sdk/lib/core/string.dart#newcode490 sdk/lib/core/string.dart:490: String replaceRange(String replacement, int start, [int end]); replaceRange in ...
5 years, 10 months ago (2015-02-23 14:36:35 UTC) #4
sra1
DBC. I agree with Florian on argument ordering. https://codereview.chromium.org/949753005/diff/20001/sdk/lib/_internal/compiler/js_lib/js_string.dart File sdk/lib/_internal/compiler/js_lib/js_string.dart (right): https://codereview.chromium.org/949753005/diff/20001/sdk/lib/_internal/compiler/js_lib/js_string.dart#newcode107 sdk/lib/_internal/compiler/js_lib/js_string.dart:107: return ...
5 years, 10 months ago (2015-02-23 18:58:27 UTC) #6
kevmoo
DBC https://codereview.chromium.org/949753005/diff/20001/sdk/lib/core/string.dart File sdk/lib/core/string.dart (right): https://codereview.chromium.org/949753005/diff/20001/sdk/lib/core/string.dart#newcode490 sdk/lib/core/string.dart:490: String replaceRange(String replacement, int start, [int end]); On ...
5 years, 10 months ago (2015-02-23 19:14:23 UTC) #8
sra1
On 2015/02/23 19:14:23, kevmoo wrote: > DBC > > https://codereview.chromium.org/949753005/diff/20001/sdk/lib/core/string.dart > File sdk/lib/core/string.dart (right): > ...
5 years, 10 months ago (2015-02-23 20:35:37 UTC) #9
Lasse Reichstein Nielsen
https://codereview.chromium.org/949753005/diff/20001/sdk/lib/_internal/compiler/js_lib/js_string.dart File sdk/lib/_internal/compiler/js_lib/js_string.dart (right): https://codereview.chromium.org/949753005/diff/20001/sdk/lib/_internal/compiler/js_lib/js_string.dart#newcode107 sdk/lib/_internal/compiler/js_lib/js_string.dart:107: return "$prefix$replacement$suffix"; On 2015/02/23 18:58:27, sra1 wrote: > There ...
5 years, 10 months ago (2015-02-25 12:09:09 UTC) #10
Lasse Reichstein Nielsen
5 years, 10 months ago (2015-02-25 12:17:39 UTC) #11
Message was sent while issue was closed.
Committed patchset #3 (id:40001) manually as 44022 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698