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. |
} |
} |