removed some IsSubstring* functions
(they are in Pikotools in text/convert.h now) git-svn-id: svn://ttmath.org/publicrep/winix/trunk@1135 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
parent
1b8f5dc673
commit
8f6004d444
|
@ -379,64 +379,6 @@ bool was_comma = false;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
template<class StringType1, class StringType2>
|
|
||||||
bool IsSubStringp(const StringType1 * short_str, const StringType2 * long_str)
|
|
||||||
{
|
|
||||||
while( *short_str && *long_str && wchar_t(*short_str) == wchar_t(*long_str) )
|
|
||||||
{
|
|
||||||
++short_str;
|
|
||||||
++long_str;
|
|
||||||
}
|
|
||||||
|
|
||||||
if( *short_str == 0 )
|
|
||||||
return true;
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<class StringType1, class StringType2>
|
|
||||||
bool IsSubString(const StringType1 * short_str, const StringType2 * long_str)
|
|
||||||
{
|
|
||||||
return IsSubStringp(short_str, long_str);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<class StringType1, class StringType2>
|
|
||||||
bool IsSubString(const StringType1 & short_str, const StringType2 & long_str)
|
|
||||||
{
|
|
||||||
return IsSubStringp(short_str.c_str(), long_str.c_str());
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<class StringType1, class StringType2>
|
|
||||||
bool IsSubStringNoCasep(const StringType1 * short_str, const StringType2 * long_str)
|
|
||||||
{
|
|
||||||
while( *short_str && *long_str && PT::ToLower(*short_str) == PT::ToLower(*long_str) )
|
|
||||||
{
|
|
||||||
++short_str;
|
|
||||||
++long_str;
|
|
||||||
}
|
|
||||||
|
|
||||||
if( *short_str == 0 )
|
|
||||||
return true;
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
template<class StringType1, class StringType2>
|
|
||||||
bool IsSubStringNoCase(const StringType1 * short_str, const StringType2 * long_str)
|
|
||||||
{
|
|
||||||
return IsSubStringNoCasep(short_str, long_str);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<class StringType1, class StringType2>
|
|
||||||
bool IsSubStringNoCase(const StringType1 & short_str, const StringType2 & long_str)
|
|
||||||
{
|
|
||||||
return IsSubStringNoCasep(short_str.c_str(), long_str.c_str());
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
template<class StringType1, class StringType2>
|
template<class StringType1, class StringType2>
|
||||||
|
|
Loading…
Reference in New Issue