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

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

Issue 11238035: Make isEmpty a getter. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update status file with co19 issue number. Created 8 years, 2 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « pkg/intl/lib/src/date_format_field.dart ('k') | pkg/unittest/core_matchers.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 * A class for holding onto the data for a date so that it can be built 6 * A class for holding onto the data for a date so that it can be built
7 * up incrementally. 7 * up incrementally.
8 */ 8 */
9 class _DateBuilder { 9 class _DateBuilder {
10 // Default the date values to the EPOCH so that there's a valid date 10 // Default the date values to the EPOCH so that there's a valid date
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 return results; 126 return results;
127 } 127 }
128 128
129 /** 129 /**
130 * Assuming that the contents are characters, read as many digits as we 130 * Assuming that the contents are characters, read as many digits as we
131 * can see and then return the corresponding integer. Advance the stream. 131 * can see and then return the corresponding integer. Advance the stream.
132 */ 132 */
133 var digitMatcher = const RegExp(r'\d+'); 133 var digitMatcher = const RegExp(r'\d+');
134 int nextInteger() { 134 int nextInteger() {
135 var string = digitMatcher.stringMatch(rest()); 135 var string = digitMatcher.stringMatch(rest());
136 if (string == null || string.isEmpty()) return null; 136 if (string == null || string.isEmpty) return null;
137 read(string.length); 137 read(string.length);
138 return int.parse(string); 138 return int.parse(string);
139 } 139 }
140 } 140 }
OLDNEW
« no previous file with comments | « pkg/intl/lib/src/date_format_field.dart ('k') | pkg/unittest/core_matchers.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698