changeset 201:6293c40673a4

sync with dwt-linux
author Frank Benoit <benoit@tionex.de>
date Fri, 11 Apr 2008 23:22:24 +0200
parents fef1e3b37378
children 1d129e5f6aa6
files dwt/dwthelper/utils.d
diffstat 1 files changed, 9 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/dwt/dwthelper/utils.d	Fri Apr 11 17:15:55 2008 +0200
+++ b/dwt/dwthelper/utils.d	Fri Apr 11 23:22:24 2008 +0200
@@ -94,6 +94,15 @@
     public bool booleanValue(){
         return value;
     }
+    public static Boolean valueOf( char[] s ){
+        if( s == "yes" || s == "true" ){
+            return TRUE;
+        }
+        return FALSE;
+    }
+    public static Boolean valueOf( bool b ){
+        return b ? TRUE : FALSE;
+    }
 }
 
 alias Boolean    ValueWrapperBool;