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

Unified Diff: sdk/lib/io/http_utils.dart

Issue 12282038: Remove deprecated string features. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Merge to head Created 7 years, 10 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
« no previous file with comments | « sdk/lib/io/http_parser.dart ('k') | sdk/lib/io/mime_multipart_parser.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/io/http_utils.dart
diff --git a/sdk/lib/io/http_utils.dart b/sdk/lib/io/http_utils.dart
index a68f08f68452a60383a7657c7bb65b2750fbd4cd..8fe62ed045e6ab21e4b5594bb651c6465f0f8e7e 100644
--- a/sdk/lib/io/http_utils.dart
+++ b/sdk/lib/io/http_utils.dart
@@ -18,7 +18,7 @@ class _HttpUtils {
// Start decoding from the first encoded character.
List<int> bytes = new List<int>();
- for (int i = 0; i < index; i++) bytes.add(urlEncoded.charCodeAt(i));
+ for (int i = 0; i < index; i++) bytes.add(urlEncoded.codeUnitAt(i));
for (int i = index; i < urlEncoded.length; i++) {
if (urlEncoded[i] == "+") {
bytes.add(32);
@@ -28,7 +28,7 @@ class _HttpUtils {
}
int byte = 0;
for (int j = 0; j < 2; j++) {
- var charCode = urlEncoded.charCodeAt(i + j + 1);
+ var charCode = urlEncoded.codeUnitAt(i + j + 1);
if (0x30 <= charCode && charCode <= 0x39) {
byte = byte * 16 + charCode - 0x30;
} else {
@@ -44,7 +44,7 @@ class _HttpUtils {
bytes.add(byte);
i += 2;
} else {
- bytes.add(urlEncoded.charCodeAt(i));
+ bytes.add(urlEncoded.codeUnitAt(i));
}
}
return decodeUtf8(bytes);
@@ -229,7 +229,7 @@ class _HttpUtils {
int seconds;
if (format == formatAsctime) {
month = expectMonth(" ");
- if (date.charCodeAt(index) == SP) index++;
+ if (date.codeUnitAt(index) == SP) index++;
day = expectNum(" ");
hours = expectNum(":");
minutes = expectNum(":");
@@ -265,7 +265,7 @@ class _HttpUtils {
}
bool isDelimiter(String s) {
- int char = s.charCodeAt(0);
+ int char = s.codeUnitAt(0);
if (char == 0x09) return true;
if (char >= 0x20 && char <= 0x2F) return true;
if (char >= 0x3B && char <= 0x40) return true;
@@ -275,7 +275,7 @@ class _HttpUtils {
}
bool isNonDelimiter(String s) {
- int char = s.charCodeAt(0);
+ int char = s.codeUnitAt(0);
if (char >= 0x00 && char <= 0x08) return true;
if (char >= 0x0A && char <= 0x1F) return true;
if (char >= 0x30 && char <= 0x39) return true; // Digit
@@ -287,7 +287,7 @@ class _HttpUtils {
}
bool isDigit(String s) {
- int char = s.charCodeAt(0);
+ int char = s.codeUnitAt(0);
if (char > 0x2F && char < 0x3A) return true;
return false;
}
« no previous file with comments | « sdk/lib/io/http_parser.dart ('k') | sdk/lib/io/mime_multipart_parser.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698