Changeset 292:708cbfe418e7 for dwt/dwthelper
- Timestamp:
- 08/21/08 11:33:44 (5 months ago)
- Files:
-
- dwt/dwthelper/utils.d (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
dwt/dwthelper/utils.d
r287 r292 198 198 public static int parseInt( String s, int radix ){ 199 199 try{ 200 return tango.text.convert.Integer. parse( s, cast(uint)radix );200 return tango.text.convert.Integer.toLong( s, radix ); 201 201 } 202 202 catch( IllegalArgumentException e ){ … … 207 207 public static int parseInt( String s ){ 208 208 try{ 209 return tango.text.convert.Integer. parse( s );209 return tango.text.convert.Integer.toLong( s ); 210 210 } 211 211 catch( IllegalArgumentException e ){ … … 373 373 return res; 374 374 } 375 376 /++ 377 + 378 +/ 375 379 int indexToCodepointIndex( String str, int index ){ 376 380 if( index < 0 ) return index; … … 398 402 } 399 403 404 /++ 405 + Get that String, that contains the next codepoint of a String. 406 +/ 400 407 String firstCodePointStr( String str, out int consumed ){ 401 408 dchar[1] buf; … … 406 413 } 407 414 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 +/ 408 421 dchar firstCodePoint( String str ){ 409 422 int dummy;
