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

Unified Diff: samples/swarm/swarm_ui_lib/layout/GridLayoutParser.dart

Issue 12282038: Remove deprecated string features. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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
Index: samples/swarm/swarm_ui_lib/layout/GridLayoutParser.dart
diff --git a/samples/swarm/swarm_ui_lib/layout/GridLayoutParser.dart b/samples/swarm/swarm_ui_lib/layout/GridLayoutParser.dart
index 5e49ba5e9309c744dead1f8956e00049385b57f4..04a759fea8a2e18169ce3f5bb37e8366c2a86351 100644
--- a/samples/swarm/swarm_ui_lib/layout/GridLayoutParser.dart
+++ b/samples/swarm/swarm_ui_lib/layout/GridLayoutParser.dart
@@ -13,18 +13,18 @@ class _Parser {
// TODO(jmesserly): shouldn't need this optimization, but dart_json parser
// found that they needed this.
- static const A_BIG = 65; // 'A'.charCodeAt(0)
- static const Z_BIG = 90; // 'Z'.charCodeAt(0)
- static const A_SMALL = 97; // 'a'.charCodeAt(0)
- static const Z_SMALL = 122; // 'z'.charCodeAt(0)
- static const TAB = 9; // '\t'.charCodeAt(0)
- static const NEW_LINE = 10; // '\n'.charCodeAt(0)
- static const LINE_FEED = 13; // '\r'.charCodeAt(0)
- static const SPACE = 32; // ' '.charCodeAt(0)
- static const ZERO = 48; // '0'.charCodeAt(0)
- static const NINE = 57; // '9'.charCodeAt(0)
- static const DOT = 46; // '.'.charCodeAt(0)
- static const R_PAREN = 41; // ')'.charCodeAt(0)
+ static const A_BIG = 65; // 'A'.codeUnitAt(0)
+ static const Z_BIG = 90; // 'Z'.codeUnitAt(0)
+ static const A_SMALL = 97; // 'a'.codeUnitAt(0)
+ static const Z_SMALL = 122; // 'z'.codeUnitAt(0)
+ static const TAB = 9; // '\t'.codeUnitAt(0)
+ static const NEW_LINE = 10; // '\n'.codeUnitAt(0)
+ static const LINE_FEED = 13; // '\r'.codeUnitAt(0)
+ static const SPACE = 32; // ' '.codeUnitAt(0)
+ static const ZERO = 48; // '0'.codeUnitAt(0)
+ static const NINE = 57; // '9'.codeUnitAt(0)
+ static const DOT = 46; // '.'.codeUnitAt(0)
+ static const R_PAREN = 41; // ')'.codeUnitAt(0)
final String _src;
int _offset;
@@ -61,7 +61,7 @@ class _Parser {
int get remaining => _src.length - _offset;
- int _peekChar() => _src.charCodeAt(_offset);
+ int _peekChar() => _src.codeUnitAt(_offset);
bool get endOfInput => _offset >= _src.length;
@@ -113,9 +113,9 @@ class _Parser {
// If we're eating something that's like a word, make sure
// it's not followed by more characters.
// This is ugly. Proper tokenization would make this cleaner.
- if (_isLetter(value.charCodeAt(value.length - 1))) {
+ if (_isLetter(value.codeUnitAt(value.length - 1))) {
int i = _offset + value.length;
- if (i < _src.length && _isLetter(_src.charCodeAt(i))) {
+ if (i < _src.length && _isLetter(_src.codeUnitAt(i))) {
return false;
}
}

Powered by Google App Engine
This is Rietveld 408576698