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

Minor string changes.

This commit is contained in:
Julian Storer 2010-03-26 18:23:54 +00:00
parent e0e12a8bd9
commit 66643e85ac
74 changed files with 895 additions and 889 deletions

View file

@ -174,6 +174,29 @@ int CharacterFunctions::compareIgnoreCase (const juce_wchar* s1, const juce_wcha
#endif
}
int CharacterFunctions::compareIgnoreCase (const juce_wchar* s1, const char* s2) throw()
{
jassert (s1 != 0 && s2 != 0);
for (;;)
{
if (*s1 != *s2)
{
const int diff = toUpperCase (*s1) - toUpperCase (*s2);
if (diff != 0)
return diff < 0 ? -1 : 1;
}
else if (*s1 == 0)
break;
++s1;
++s2;
}
return 0;
}
int CharacterFunctions::compareIgnoreCase (const char* const s1, const char* const s2, const int maxChars) throw()
{
jassert (s1 != 0 && s2 != 0);