GString * GStringList::FindStringContaining(const char *pzWhatToFind, __int64 *pnFoundIndex, int bMatchCase/* = 1*/, __int64 nStartingIndex/* = 0*/)
{
	GString *p = GetStrAt(nStartingIndex);
	while(p)
	{
		if (bMatchCase)
		{
			if (p->Find(pzWhatToFind) != -1)
			{
				if (pnFoundIndex)
					*pnFoundIndex = nStartingIndex;
				return p;
			}
		}
		else
		{
			if (p->FindCaseInsensitive(pzWhatToFind) == 0)
			{
				if (pnFoundIndex)
					*pnFoundIndex = nStartingIndex;
				return p;
			}
		}
		nStartingIndex++;
		p = (GString *)Next();
	}

	if (pnFoundIndex)
		*pnFoundIndex = -1;
	return 0; // not found
}