Changeset 227:4e6393f43231

Show
Ignore:
Timestamp:
04/11/08 17:19:11 (5 months ago)
Author:
Frank Benoit <benoit@tionex.de>
branch:
default
Message:

Boolean valueOf

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • dwt/dwthelper/utils.d

    r226 r227  
    9595        return value; 
    9696    } 
     97    public static Boolean valueOf( char[] s ){ 
     98        if( s == "yes" || s == "true" ){ 
     99            return TRUE; 
     100        } 
     101        return FALSE; 
     102    } 
     103    public static Boolean valueOf( bool b ){ 
     104        return b ? TRUE : FALSE; 
     105    } 
    97106} 
    98107