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

Unified Diff: sdk/lib/convert/latin1.dart

Issue 515183002: Make String.fromCharCodes take start/end. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Merge to tip of tree. Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: sdk/lib/convert/latin1.dart
diff --git a/sdk/lib/convert/latin1.dart b/sdk/lib/convert/latin1.dart
index a33598b73416a7c37b1e8968fc36273a13cd944c..dd9c65f0e3859734fb06783112078322339c7f83 100644
--- a/sdk/lib/convert/latin1.dart
+++ b/sdk/lib/convert/latin1.dart
@@ -127,11 +127,7 @@ class _Latin1DecoderSink extends ByteConversionSinkBase {
// _sink.addSlice(source, start, end, isLast).
// The code below is an moderately stupid workaround until a real
// solution can be made.
- if (start == 0 && end == source.length) {
- _sink.add(new String.fromCharCodes(source));
- } else {
- _sink.add(new String.fromCharCodes(source.sublist(start, end)));
- }
+ _sink.add(new String.fromCharCodes(source, start, end));
if (isLast) close();
}

Powered by Google App Engine
This is Rietveld 408576698