int AString<B>::ReverseFind(int len, const tchar *s, int from) const { ASSERT(from >= 0 && from <= GetLength()); if(from < GetLength()) { const tchar *ptr = B::Begin(); const tchar *p = ptr + from - len + 1; len *= sizeof(tchar); <<<<<<<<<<<<<<<<<<<<<<<<<< while(p >= ptr) { if(*s == *p && memcmp(s, p, len) == 0) return (int)(p - ptr); p--; } } return -1; }
Report message to a moderator