Mercurial > projects > dwt-win
comparison dwt/dwthelper/utils.d @ 235:ec7da638647f
Fix string compare in dwthelper/utils.d
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Sun, 08 Jun 2008 15:12:08 +0200 |
parents | 5ff96efb6f4b |
children | fd9c62a2998e d10ff1f47f84 |
comparison
equal
deleted
inserted
replaced
234:116b04c0d8c9 | 235:ec7da638647f |
---|---|
589 public bool equalsIgnoreCase( String src, String other ){ | 589 public bool equalsIgnoreCase( String src, String other ){ |
590 return tango.text.Unicode.toFold(src) == tango.text.Unicode.toFold(other); | 590 return tango.text.Unicode.toFold(src) == tango.text.Unicode.toFold(other); |
591 } | 591 } |
592 | 592 |
593 public int compareToIgnoreCase( String src, String other ){ | 593 public int compareToIgnoreCase( String src, String other ){ |
594 return tango.text.Unicode.toFold(src) < tango.text.Unicode.toFold(other); | 594 return compareTo( tango.text.Unicode.toFold(src), tango.text.Unicode.toFold(other)); |
595 } | 595 } |
596 public int compareTo( String src, String other ){ | 596 public int compareTo( String src, String other ){ |
597 return src < other; | 597 return typeid(String).compare( cast(void*)&src, cast(void*)&other ); |
598 } | 598 } |
599 | 599 |
600 public bool startsWith( String src, String pattern ){ | 600 public bool startsWith( String src, String pattern ){ |
601 if( src.length < pattern.length ){ | 601 if( src.length < pattern.length ){ |
602 return false; | 602 return false; |