| Index: sdk/lib/_internal/compiler/implementation/lib/js_string.dart
|
| ===================================================================
|
| --- sdk/lib/_internal/compiler/implementation/lib/js_string.dart (revision 16030)
|
| +++ sdk/lib/_internal/compiler/implementation/lib/js_string.dart (working copy)
|
| @@ -163,4 +163,10 @@
|
| Type get runtimeType => String;
|
|
|
| int get length => JS('int', r'#.length', this);
|
| +
|
| + String operator [](int index) {
|
| + if (index is !int) throw new ArgumentError(index);
|
| + if (index >= length || index < 0) throw new RangeError.value(index);
|
| + return JS('String', '#[#]', this, index);
|
| + }
|
| }
|
|
|