version 1.2, 2001/02/11 05:42:33
|
version 1.3, 2001/02/11 17:19:30
|
|
|
// Author: | // Author: |
// | // |
// $Log$ | // $Log$ |
|
// Revision 1.3 2001/02/11 17:19:30 mike |
|
// added reverseFind() method |
|
// |
// Revision 1.2 2001/02/11 05:42:33 mike | // Revision 1.2 2001/02/11 05:42:33 mike |
// new | // new |
// | // |
|
|
return Uint32(-1); | return Uint32(-1); |
} | } |
| |
|
Uint32 String::reverseFind(Char16 c) const |
|
{ |
|
const Char16* first = getData(); |
|
const Char16* last = getData() + getLength(); |
|
|
|
while (last != first) |
|
{ |
|
if (*--last == c) |
|
return last - first; |
|
} |
|
|
|
return Uint32(-1); |
|
} |
|
|
int String::compare(const Char16* s1, const Char16* s2) | int String::compare(const Char16* s1, const Char16* s2) |
{ | { |
while (*s1 && *s2) | while (*s1 && *s2) |