Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 patch class String { | 5 patch class String { |
| 6 /* patch */ factory String.fromCharCodes(Iterable<int> charCodes) { | 6 /* patch */ factory String.fromCharCodes(Iterable<int> charCodes) { |
| 7 return _StringBase.createFromCharCodes(charCodes); | 7 return _StringBase.createFromCharCodes(charCodes); |
| 8 } | 8 } |
| 9 | |
| 10 /* patch */ const factory String.env(String name, String defaultValue) | |
|
floitsch
2013/09/27 13:52:31
[String defaultValue = ""]
Ivan Posva
2013/09/27 21:05:06
ditto.
| |
| 11 native "String_env"; | |
| 9 } | 12 } |
| 10 | 13 |
| 11 | 14 |
| 12 /** | 15 /** |
| 13 * [_StringBase] contains common methods used by concrete String | 16 * [_StringBase] contains common methods used by concrete String |
| 14 * implementations, e.g., _OneByteString. | 17 * implementations, e.g., _OneByteString. |
| 15 */ | 18 */ |
| 16 class _StringBase { | 19 class _StringBase { |
| 17 | 20 |
| 18 factory _StringBase._uninstantiable() { | 21 factory _StringBase._uninstantiable() { |
| (...skipping 615 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 634 class _CodeUnits extends Object with ListMixin<int>, | 637 class _CodeUnits extends Object with ListMixin<int>, |
| 635 UnmodifiableListMixin<int> { | 638 UnmodifiableListMixin<int> { |
| 636 /** The string that this is the code units of. */ | 639 /** The string that this is the code units of. */ |
| 637 String _string; | 640 String _string; |
| 638 | 641 |
| 639 _CodeUnits(this._string); | 642 _CodeUnits(this._string); |
| 640 | 643 |
| 641 int get length => _string.length; | 644 int get length => _string.length; |
| 642 int operator[](int i) => _string.codeUnitAt(i); | 645 int operator[](int i) => _string.codeUnitAt(i); |
| 643 } | 646 } |
| OLD | NEW |