implement ends with search r=alecf 30470

This commit is contained in:
bienvenu%netscape.com 2000-07-26 21:19:24 +00:00
Родитель bc803b5f5b
Коммит c99dbe923d
1 изменённых файлов: 10 добавлений и 1 удалений

Просмотреть файл

@ -873,13 +873,22 @@ nsresult nsMsgSearchTerm::MatchString (const char *stringToMatch,
#endif
break;
case nsMsgSearchOp::EndsWith:
{
PRUint32 searchStrLen = (PRUint32) PL_strlen(stringToMatch);
if (n_str.Length() <= searchStrLen)
{
PRInt32 sourceStrOffset = searchStrLen - n_str.Length();
if (PL_strcmp(stringToMatch + sourceStrOffset, n_str) == 0)
result = PR_TRUE;
}
}
#ifdef DO_I18N_YET
{
if((nsnull != n_str) && (nsnull != n_header) && INTL_StrEndWith(csid, n_header, n_str))
result = PR_TRUE;
}
#else
NS_ASSERTION(PR_FALSE, "not implemented yet");
#endif
break;
default: