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

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

Issue 10913271: Move parseInt parseDouble to int/double classes as a static method. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Make int.parse directly native. Created 8 years, 3 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/fixnum/int32.dart ('k') | pkg/unittest/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 * 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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 118
119 /** 119 /**
120 * Assuming that the contents are characters, read as many digits as we 120 * Assuming that the contents are characters, read as many digits as we
121 * can see and then return the corresponding integer. Advance the stream. 121 * can see and then return the corresponding integer. Advance the stream.
122 */ 122 */
123 var digitMatcher = const RegExp(@'\d+'); 123 var digitMatcher = const RegExp(@'\d+');
124 int nextInteger() { 124 int nextInteger() {
125 var string = digitMatcher.stringMatch(rest()); 125 var string = digitMatcher.stringMatch(rest());
126 if (string == null || string.isEmpty()) return null; 126 if (string == null || string.isEmpty()) return null;
127 read(string.length); 127 read(string.length);
128 return parseInt(string); 128 return int.parse(string);
129 } 129 }
130 } 130 }
OLDNEW
« no previous file with comments | « pkg/fixnum/int32.dart ('k') | pkg/unittest/html_layout_config.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698