Mercurial > projects > dwt-win
comparison dwt/dwthelper/utils.d @ 224:679fb4a215dc
Added the compareToIgnoreCase to utils
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Mon, 19 May 2008 14:35:49 +0200 |
parents | ab60f3309436 |
children | 53c57b061fd9 |
comparison
equal
deleted
inserted
replaced
223:2d153805c8cd | 224:679fb4a215dc |
---|---|
597 | 597 |
598 public bool equalsIgnoreCase( String src, String other ){ | 598 public bool equalsIgnoreCase( String src, String other ){ |
599 return tango.text.Unicode.toFold(src) == tango.text.Unicode.toFold(other); | 599 return tango.text.Unicode.toFold(src) == tango.text.Unicode.toFold(other); |
600 } | 600 } |
601 | 601 |
602 public int compareToIgnoreCase( String src, String other ){ | |
603 return tango.text.Unicode.toFold(src) < tango.text.Unicode.toFold(other); | |
604 } | |
605 | |
602 public bool startsWith( String src, String pattern ){ | 606 public bool startsWith( String src, String pattern ){ |
603 if( src.length < pattern.length ){ | 607 if( src.length < pattern.length ){ |
604 return false; | 608 return false; |
605 } | 609 } |
606 return src[ 0 .. pattern.length ] == pattern; | 610 return src[ 0 .. pattern.length ] == pattern; |