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

Unified Diff: sdk/lib/core/string.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, 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 side-by-side diff with in-line comments
Download patch
Index: sdk/lib/core/string.dart
diff --git a/sdk/lib/core/string.dart b/sdk/lib/core/string.dart
index 488078d803a74eabbf71b1a9bb0713ec798aa9a9..8da434e7d520d7135dd0a571f7e031e34cbc3f28 100644
--- a/sdk/lib/core/string.dart
+++ b/sdk/lib/core/string.dart
@@ -125,6 +125,13 @@ abstract class String implements Comparable<String>, Pattern {
}
/**
+ * Returns the string for the given environment variable [name] or
+ * [defaultValue] if [name] is not present.
+ */
+ external const factory String.fromEnvironment(String name,
+ {String defaultValue});
+
+ /**
* Gets the character (as a single-code-unit [String]) at the given [index].
*
* The returned string represents exactly one UTF-16 code unit, which may be

Powered by Google App Engine
This is Rietveld 408576698