Index: sdk/lib/core/int.dart |
=================================================================== |
--- sdk/lib/core/int.dart (revision 28841) |
+++ sdk/lib/core/int.dart (working copy) |
@@ -252,4 +252,12 @@ |
external static int parse(String source, |
{ int radix, |
int onError(String source) }); |
+ |
+ /** |
+ * Returns the integer value of the given environment variable [name]. |
+ * The [defaultValue] is returned if [name] is not present in the environment |
+ * or if its value is not an integer. |
+ */ |
+ external const factory int.fromEnvironment(String name, |
+ {int defaultValue: 0}); |
} |