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

Unified Diff: tool/input_sdk/lib/core/bool.dart

Issue 1952013002: Update core/{bool,errors,exceptions} (Closed) Base URL: https://github.com/dart-lang/dev_compiler@master
Patch Set: Created 4 years, 7 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 | « test/browser/language_tests.js ('k') | tool/input_sdk/lib/core/errors.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tool/input_sdk/lib/core/bool.dart
diff --git a/tool/input_sdk/lib/core/bool.dart b/tool/input_sdk/lib/core/bool.dart
index 8150219d02a0105fd468df416c26bd283d5025b3..d1f31d760f68caad1467b29d32cf0541f543298f 100644
--- a/tool/input_sdk/lib/core/bool.dart
+++ b/tool/input_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
* [String.fromEnvironment] constructor directly:
*
* const isLoggingOn = (const String.fromEnvironment("logging") == "on");
« no previous file with comments | « test/browser/language_tests.js ('k') | tool/input_sdk/lib/core/errors.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698