| Index: runtime/lib/string.dart
|
| diff --git a/runtime/lib/string.dart b/runtime/lib/string.dart
|
| index 9f1c3fbce6def6ed0773eb4f5c90842d59c26827..b5c1e38df6c85b9b685017457e94b28659966ec5 100644
|
| --- a/runtime/lib/string.dart
|
| +++ b/runtime/lib/string.dart
|
| @@ -334,42 +334,9 @@ class StringBase {
|
| return result;
|
| }
|
|
|
| - String toLowerCase() {
|
| - final int aCode = "A".charCodeAt(0);
|
| - final int zCode = "Z".charCodeAt(0);
|
| - final int delta = aCode - "a".charCodeAt(0);
|
| - return _convert(this, aCode, zCode, delta);
|
| - }
|
| -
|
| - String toUpperCase() {
|
| - final int aCode = "a".charCodeAt(0);
|
| - final int zCode = "z".charCodeAt(0);
|
| - final int delta = aCode - "A".charCodeAt(0);
|
| - return _convert(this, aCode, zCode, delta);
|
| - }
|
| -
|
| - static String _convert(String str, int startCode, int endCode, int delta) {
|
| - final int len = str.length;
|
| - int i = 0;
|
| - // Check if we can just return the string.
|
| - for (; i < len; i++) {
|
| - int code = str.charCodeAt(i);
|
| - if ((startCode <= code) && (code <= endCode)) break;
|
| - }
|
| - if (i == len) return str;
|
| -
|
| - Array<int> charCodes = new Array<int>(len);
|
| - for (i = 0; i < len; i++) {
|
| - int code = str.charCodeAt(i);
|
| - if ((startCode <= code) && (code <= endCode)) {
|
| - code = code - delta;
|
| - }
|
| - charCodes[i] = code;
|
| - }
|
| - return StringBase.createFromCharCodes(charCodes);
|
| - }
|
| -
|
| + String toUpperCase() native "String_toUpperCase";
|
|
|
| + String toLowerCase() native "String_toLowerCase";
|
|
|
| // Implementations of Strings methods follow below.
|
| static String join(Array<String> strings, String separator) {
|
|
|