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

Unified Diff: sdk/lib/core/bool.dart

Issue 1350053002: Add "environment" parameter to spawnUri for String.fromEnvironment support. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Address comments Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sdk/lib/_internal/js_runtime/lib/isolate_patch.dart ('k') | sdk/lib/isolate/isolate.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/core/bool.dart
diff --git a/sdk/lib/core/bool.dart b/sdk/lib/core/bool.dart
index 8150219d02a0105fd468df416c26bd283d5025b3..d1f31d760f68caad1467b29d32cf0541f543298f 100644
--- a/sdk/lib/core/bool.dart
+++ b/sdk/lib/core/bool.dart
@@ -21,11 +21,19 @@ class bool {
* In all other cases, including when there is no declaration for `name`,
* the result is the [defaultValue].
*
+ * The result is the same as would be returned by:
+ *
+ * (const String.fromEnvironment(name) == "true")
+ * ? true
+ * : (const String.fromEnvironment(name) == "false")
+ * ? false
+ * : defaultValue
+ *
* Example:
*
* const loggingFlag = const bool.fromEnvironment("logging");
*
- * If you want to use a different truth-string, you can use the
+ * If you want to use a different truth-string than `"true"`, you can use the
floitsch 2015/09/22 09:36:46 no need to codify the "true".
Lasse Reichstein Nielsen 2015/09/22 10:28:09 It's intended as code, so I prefer it codified.
* [String.fromEnvironment] constructor directly:
*
* const isLoggingOn = (const String.fromEnvironment("logging") == "on");
« no previous file with comments | « sdk/lib/_internal/js_runtime/lib/isolate_patch.dart ('k') | sdk/lib/isolate/isolate.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698