Changeset 124:1da8c82b1c84

Show
Ignore:
Timestamp:
02/11/08 20:21:26 (1 year ago)
Author:
Frank Benoit <benoit@tionex.de>
branch:
default
Message:

Add: hasString for ResourceBundle? to indicate if the string has length 0 or is not present

Files:

Legend:

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

    r84 r124  
    3535            //tango.io.Stdout.Stdout.formatln( "properties put {} startline", __LINE__ ); 
    3636            readLine(); 
    37             line = tango.text.Util.trim( line ); 
     37            line = line.trim(); 
    3838            if( line.length is 0 ){ 
    3939                //tango.io.Stdout.Stdout.formatln( "properties put {} was 0 length", __LINE__ ); 
     
    6262                    case 'n': c = '\n'; break; 
    6363                    case '\\': c = '\\'; break; 
    64                     default: c = '?'; break; 
     64                    default: break; 
    6565                    } 
    6666                } 
     
    9090            } 
    9191            if( iskeypart ){ 
    92                 tango.io.Stdout.Stdout.formatln( "dwt.dwthelper.ResourceBundle ctor cannot find '='." ); 
     92                //tango.io.Stdout.Stdout.formatln( "dwt.dwthelper.ResourceBundle ctor cannot find '='." ); 
    9393                continue; 
    9494            } 
    95             key = tango.text.Util.trim( key ); 
    96             value = tango.text.Util.trim(value); 
     95            key = key.trim(); 
     96            value = value.trim(); 
    9797            //tango.io.Stdout.Stdout.formatln( "properties put {}=>{}", key, value ); 
    9898 
     
    100100            //tango.io.Stdout.Stdout.formatln( "properties put {}", __LINE__ ); 
    101101        } 
     102    } 
     103 
     104    public bool hasString( char[] key ){ 
     105        return ( key in map ) !is null; 
    102106    } 
    103107