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

Issue 172153002: Add String.repeat, String.padLeft, String.padRight. (Closed)

Created:
6 years, 10 months ago by Lasse Reichstein Nielsen
Modified:
6 years, 10 months ago
Reviewers:
Søren Gjesse, floitsch
CC:
reviews_dartlang.org, vm-dev_dartlang.org, floitsch, srdjan
Visibility:
Public.

Description

Add String.repeat, String.padLeft, String.padRight. We keep seeing reimplementations everywhere, and reimplementing it ourselves. BUG= http://dartbug.com/16919 R=sgjesse@google.com Committed: https://code.google.com/p/dart/source/detail?r=32784

Patch Set 1 #

Total comments: 18

Patch Set 2 : Address comments. #

Patch Set 3 : Removed multi-char padding from padLeft/Right. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+647 lines, -357 lines) Patch
M runtime/lib/string_patch.dart View 1 2 2 chunks +126 lines, -0 lines 0 comments Download
M sdk/lib/_internal/lib/js_string.dart View 1 2 1 chunk +65 lines, -20 lines 0 comments Download
M sdk/lib/core/string.dart View 1 2 1 chunk +38 lines, -0 lines 0 comments Download
M tests/corelib/string_test.dart View 1 2 2 chunks +418 lines, -337 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
Lasse Reichstein Nielsen
6 years, 10 months ago (2014-02-19 09:31:00 UTC) #1
floitsch
FYI. https://codereview.chromium.org/172153002/diff/1/runtime/lib/string_patch.dart File runtime/lib/string_patch.dart (right): https://codereview.chromium.org/172153002/diff/1/runtime/lib/string_patch.dart#newcode333 runtime/lib/string_patch.dart:333: for (int i = 0; i < delta; ...
6 years, 10 months ago (2014-02-19 10:20:36 UTC) #2
Søren Gjesse
LGTM, but I think we should hold back repeat. https://codereview.chromium.org/172153002/diff/1/sdk/lib/_internal/lib/js_string.dart File sdk/lib/_internal/lib/js_string.dart (right): https://codereview.chromium.org/172153002/diff/1/sdk/lib/_internal/lib/js_string.dart#newcode186 sdk/lib/_internal/lib/js_string.dart:186: ...
6 years, 10 months ago (2014-02-19 10:44:10 UTC) #3
Lasse Reichstein Nielsen
https://codereview.chromium.org/172153002/diff/1/runtime/lib/string_patch.dart File runtime/lib/string_patch.dart (right): https://codereview.chromium.org/172153002/diff/1/runtime/lib/string_patch.dart#newcode333 runtime/lib/string_patch.dart:333: for (int i = 0; i < delta; i++) ...
6 years, 10 months ago (2014-02-19 11:43:16 UTC) #4
Lasse Reichstein Nielsen
6 years, 10 months ago (2014-02-19 12:33:05 UTC) #5
Message was sent while issue was closed.
Committed patchset #3 manually as r32784 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698