Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 } |
| OLD | NEW |