changed: using PT::ToLower instead of ToSmall
using PT::ToUpper instead of ToCapital using PT::EqualNoCase instead of EqualNoCase git-svn-id: svn://ttmath.org/publicrep/winix/trunk@1112 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
@@ -378,14 +378,6 @@ bool was_comma = false;
|
||||
|
||||
|
||||
|
||||
wchar_t ToSmall(wchar_t c);
|
||||
void ToSmall(std::wstring & s);
|
||||
|
||||
wchar_t ToCapital(wchar_t c);
|
||||
void ToCapital(std::wstring & s);
|
||||
|
||||
|
||||
|
||||
|
||||
template<class StringType1, class StringType2>
|
||||
bool IsSubStringp(const StringType1 * short_str, const StringType2 * long_str)
|
||||
@@ -420,7 +412,7 @@ bool IsSubString(const StringType1 & short_str, const StringType2 & long_str)
|
||||
template<class StringType1, class StringType2>
|
||||
bool IsSubStringNoCasep(const StringType1 * short_str, const StringType2 * long_str)
|
||||
{
|
||||
while( *short_str && *long_str && ToSmall(*short_str) == ToSmall(*long_str) )
|
||||
while( *short_str && *long_str && PT::ToLower(*short_str) == PT::ToLower(*long_str) )
|
||||
{
|
||||
++short_str;
|
||||
++long_str;
|
||||
@@ -471,30 +463,6 @@ bool Equal(const StringType1 & str1, const StringType2 & str2)
|
||||
|
||||
|
||||
|
||||
template<class StringType1, class StringType2>
|
||||
bool EqualNoCase(const StringType1 * str1, const StringType2 * str2)
|
||||
{
|
||||
while( *str1 && *str2 && ToSmall(*str1) == ToSmall(*str2) )
|
||||
{
|
||||
++str1;
|
||||
++str2;
|
||||
}
|
||||
|
||||
if( *str1 == 0 && *str2 == 0 )
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
template<class StringType1, class StringType2>
|
||||
bool EqualNoCase(const StringType1 & str1, const StringType2 & str2)
|
||||
{
|
||||
return EqualNoCase(str1.c_str(), str2.c_str());
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
looking for 'look_for' string in 'buf' and replacing it with 'replace'
|
||||
'replace' can be empty (so only 'look_for' will be deleted)
|
||||
|
Reference in New Issue
Block a user