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

Side by Side Diff: pkg/intl/lib/src/date_format_helpers.dart

Issue 11312203: "Reverting 14829-14832" (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « pkg/intl/lib/intl_standalone.dart ('k') | pkg/unittest/lib/html_layout_config.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 5
6 part of intl; 6 part of intl;
7 7
8 /** 8 /**
9 * A class for holding onto the data for a date so that it can be built 9 * A class for holding onto the data for a date so that it can be built
10 * up incrementally. 10 * up incrementally.
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 while (!atEnd()) { 126 while (!atEnd()) {
127 if (f(next())) results.add(index - 1); 127 if (f(next())) results.add(index - 1);
128 } 128 }
129 return results; 129 return results;
130 } 130 }
131 131
132 /** 132 /**
133 * Assuming that the contents are characters, read as many digits as we 133 * Assuming that the contents are characters, read as many digits as we
134 * can see and then return the corresponding integer. Advance the stream. 134 * can see and then return the corresponding integer. Advance the stream.
135 */ 135 */
136 var digitMatcher = new RegExp(r'\d+'); 136 var digitMatcher = const RegExp(r'\d+');
137 int nextInteger() { 137 int nextInteger() {
138 var string = digitMatcher.stringMatch(rest()); 138 var string = digitMatcher.stringMatch(rest());
139 if (string == null || string.isEmpty) return null; 139 if (string == null || string.isEmpty) return null;
140 read(string.length); 140 read(string.length);
141 return int.parse(string); 141 return int.parse(string);
142 } 142 }
143 } 143 }
OLDNEW
« no previous file with comments | « pkg/intl/lib/intl_standalone.dart ('k') | pkg/unittest/lib/html_layout_config.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698