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

sync with dwt-linux

Files:

Legend:

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

    r287 r292  
    198198    public static int parseInt( String s, int radix ){ 
    199199        try{ 
    200             return tango.text.convert.Integer.parse( s, cast(uint)radix ); 
     200            return tango.text.convert.Integer.toLong( s, radix ); 
    201201        } 
    202202        catch( IllegalArgumentException e ){ 
     
    207207    public static int parseInt( String s ){ 
    208208        try{ 
    209             return tango.text.convert.Integer.parse( s ); 
     209            return tango.text.convert.Integer.toLong( s ); 
    210210        } 
    211211        catch( IllegalArgumentException e ){ 
     
    373373    return res; 
    374374} 
     375 
     376/++ 
     377 + 
     378 +/ 
    375379int indexToCodepointIndex( String str, int index ){ 
    376380    if( index < 0 ) return index; 
     
    398402} 
    399403 
     404/++ 
     405 + Get that String, that contains the next codepoint of a String. 
     406 +/ 
    400407String firstCodePointStr( String str, out int consumed ){ 
    401408    dchar[1] buf; 
     
    406413} 
    407414 
     415/++ 
     416 + Get first codepoint of a String. If an offset is needed, simply use a slice: 
     417 + --- 
     418 + dchar res = str[ offset .. $ ].firstCodePoint(); 
     419 + --- 
     420 +/ 
    408421dchar firstCodePoint( String str ){ 
    409422    int dummy;