Index: pkg/analyzer/lib/src/generated/utilities_general.dart |
diff --git a/pkg/analyzer/lib/src/generated/utilities_general.dart b/pkg/analyzer/lib/src/generated/utilities_general.dart |
index d000b54e7bf4db8f73db664cf8076a957f107f67..c1a3446b9ce50a3f6bfa49da5d8a7a661d816600 100644 |
--- a/pkg/analyzer/lib/src/generated/utilities_general.dart |
+++ b/pkg/analyzer/lib/src/generated/utilities_general.dart |
@@ -8,6 +8,24 @@ import 'dart:collection'; |
import 'dart:developer' show UserTag; |
/** |
+ * Test if the given [value] is `true` or the string "true" (case-insensitive). |
+ */ |
+bool isTrue(Object value) => |
+ value is bool ? value : toLowerCase(value) == 'true'; |
+ |
+/** |
+ * Safely convert this [value] to lower case, returning `null` if [value] is |
+ * null. |
+ */ |
+String toLowerCase(Object value) => value?.toString()?.toLowerCase(); |
+ |
+/** |
+ * Safely convert this [value] to upper case, returning `null` if [value] is |
+ * null. |
+ */ |
+String toUpperCase(Object value) => value?.toString()?.toUpperCase(); |
+ |
+/** |
* Jenkins hash function, optimized for small integers. |
* Borrowed from sdk/lib/math/jenkins_smi_hash.dart. |
*/ |