1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-14 00:14:18 +00:00

Minor code clean-ups.

This commit is contained in:
Julian Storer 2010-03-20 21:41:24 +00:00
parent 97e9095933
commit af2137ecaa
11 changed files with 261 additions and 359 deletions

View file

@ -825,8 +825,10 @@ int String::indexOfChar (const int startIndex,
if (*t == character)
return (int) (t - text);
if (*t++ == 0)
if (*t == 0)
return -1;
++t;
}
}
@ -959,7 +961,18 @@ bool String::contains (const juce_wchar* const other) const throw()
bool String::containsChar (const juce_wchar character) const throw()
{
return indexOfChar (character) >= 0;
const juce_wchar* t = text;
for (;;)
{
if (*t == character)
return true;
if (*t == 0)
return false;
++t;
}
}
bool String::containsIgnoreCase (const juce_wchar* const t) const throw()