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

Unified Diff: runtime/lib/string_patch.dart

Issue 15333006: Rewrite double.parse. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 7 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
Index: runtime/lib/string_patch.dart
diff --git a/runtime/lib/string_patch.dart b/runtime/lib/string_patch.dart
index e9f575940db25bc174bee17c4c43497df754ad20..8d54046cda1d4c597c2e3d33b32a5e668e3d43d8 100644
--- a/runtime/lib/string_patch.dart
+++ b/runtime/lib/string_patch.dart
@@ -516,7 +516,8 @@ class _OneByteString extends _StringBase implements String {
bool _isWhitespace(int codePoint) {
return
(codePoint == 32) || // Space.
- ((9 <= codePoint) && (codePoint <= 13)); // CR, LF, TAB, etc.
+ ((9 <= codePoint) && (codePoint <= 13)) || // CR, LF, TAB, etc.
+ (codePoint == 0xA0); // NBSP.
}
String _substringUncheckedNative(int startIndex, int endIndex)
@@ -574,7 +575,8 @@ class _TwoByteString extends _StringBase implements String {
bool _isWhitespace(int codePoint) {
return
(codePoint == 32) || // Space.
- ((9 <= codePoint) && (codePoint <= 13)); // CR, LF, TAB, etc.
+ ((9 <= codePoint) && (codePoint <= 13)) || // CR, LF, TAB, etc.
+ (codePoint == 0xA0); // NBSP.
}
}

Powered by Google App Engine
This is Rietveld 408576698