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

Side by Side Diff: sdk/lib/core/int.dart

Issue 50983002: Implement fromEnvironment on bool, int and String (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed comments Created 7 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
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 part of dart.core; 5 part of dart.core;
6 6
7 /** 7 /**
8 * An arbitrarily large integer. 8 * An arbitrarily large integer.
9 * 9 *
10 * **Note:** When compiling to JavaScript, integers are 10 * **Note:** When compiling to JavaScript, integers are
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 * sign, the [onError] is called with the [source] as argument, and its return 245 * sign, the [onError] is called with the [source] as argument, and its return
246 * value is used instead. If no [onError] is provided, a [FormatException] 246 * value is used instead. If no [onError] is provided, a [FormatException]
247 * is thrown. 247 * is thrown.
248 * 248 *
249 * The [onError] function is only invoked if [source] is a [String]. It is 249 * The [onError] function is only invoked if [source] is a [String]. It is
250 * not invoked if the [source] is, for example, `null`. 250 * not invoked if the [source] is, for example, `null`.
251 */ 251 */
252 external static int parse(String source, 252 external static int parse(String source,
253 { int radix, 253 { int radix,
254 int onError(String source) }); 254 int onError(String source) });
255
256 /**
Lasse Reichstein Nielsen 2013/10/31 06:55:38 Comments need reformatting. I'll look at it today.
257 * Returns the integer value for the given environment variable
258 * [name] or [defaultValue] if [name] is not present. If the value
259 * of the environment variable is not a valid integer literal a
260 * [FormatException] is thrown.
261 */
262 external const factory int.fromEnvironment(String name, {int defaultValue});
255 } 263 }
OLDNEW
« sdk/lib/core/bool.dart ('K') | « sdk/lib/core/bool.dart ('k') | sdk/lib/core/string.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698