Show
Ignore:
Timestamp:
05/04/08 18:12:38 (8 months ago)
Author:
Frank Benoit <benoit@tionex.de>
branch:
default
Message:

reverted the char[] to String and use the an alias.

Files:

Legend:

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

    r200 r212  
    1313class ResourceBundle { 
    1414 
    15     char[][ char[] ] map; 
     15    String[ String ] map; 
    1616 
    17     public this( char[] data ){ 
    18         char[] line; 
     17    public this( String data ){ 
     18        String line; 
    1919        int dataIndex; 
    2020 
     
    3232        bool linecontinue = false; 
    3333        bool iskeypart = true; 
    34         char[] key; 
    35         char[] value; 
     34        String key; 
     35        String value; 
    3636nextline: 
    3737        while( dataIndex < data.length ){ 
     
    108108    } 
    109109 
    110     public bool hasString( char[] key ){ 
     110    public bool hasString( String key ){ 
    111111        return ( key in map ) !is null; 
    112112    } 
    113113 
    114     public char[] getString( char[] key ){ 
     114    public String getString( String key ){ 
    115115        if( auto v = key in map ){ 
    116116            return (*v).dup; 
     
    119119    } 
    120120 
    121     public char[][] getKeys(){ 
     121    public String[] getKeys(){ 
    122122        return map.keys; 
    123123    } 
    124124 
    125125    public static ResourceBundle getBundle( ImportData data ){ 
    126         return new ResourceBundle( cast(char[]) data.data ); 
     126        return new ResourceBundle( cast(String) data.data ); 
    127127    } 
    128     public static ResourceBundle getBundle( char[] name ){ 
     128    public static ResourceBundle getBundle( String name ){ 
    129129        try{ 
    130130            scope f = new File(name); 
    131             return new ResourceBundle( cast(char[]) f.read() ); 
     131            return new ResourceBundle( cast(String) f.read() ); 
    132132        } 
    133133        catch( IOException e){ 
     
    136136        } 
    137137    } 
    138     public static ResourceBundle getBundleFromData( char[] data ){ 
     138    public static ResourceBundle getBundleFromData( String data ){ 
    139139        return new ResourceBundle( data ); 
    140140    }