Remove insertRange.
Review URL: https://codereview.chromium.org//13956006 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21464 260f80e4-7a28-3924-810f-c04153c831b5
This commit is contained in:
@@ -168,15 +168,13 @@ class TestReport {
|
||||
}
|
||||
|
||||
String _leftAlign(String s, int width) {
|
||||
List<int> outCodes = [];
|
||||
outCodes.insertRange(0, width, spaceChar);
|
||||
List<int> outCodes = new List<int>.filled(width, spaceChar);
|
||||
outCodes.setRange(0, Math.min(width, s.length), s.codeUnits);
|
||||
return new String.fromCharCodes(outCodes);
|
||||
}
|
||||
|
||||
String _rightAlign(String s, int width) {
|
||||
List<int> outCodes = [];
|
||||
outCodes.insertRange(0, width, spaceChar);
|
||||
List<int> outCodes = new List<int>.filled(width, spaceChar);
|
||||
int fromIndex = Math.max(0, width - s.length);
|
||||
int length = Math.min(width, s.length);
|
||||
outCodes.setRange(fromIndex, fromIndex + length, s.codeUnits);
|
||||
|
||||
Reference in New Issue
Block a user