Be more efficient with String.fromCharCodes (#44)
Fixes https://github.com/dart-lang/source_span/issues/37
diff --git a/lib/src/file.dart b/lib/src/file.dart
index 5a193d3..44760c7 100644
--- a/lib/src/file.dart
+++ b/lib/src/file.dart
@@ -214,7 +214,7 @@
///
/// If [end] isn't passed, it defaults to the end of the file.
String getText(int start, [int end]) =>
- String.fromCharCodes(_decodedChars.sublist(start, end));
+ String.fromCharCodes(_decodedChars, start, end);
}
/// A [SourceLocation] within a [SourceFile].