private PatternScanResult SimpleFindKeyword( string text, int startPosition,
bool matchCase)
{
PatternScanResult res;
while (true)
{
res = this.SimpleFind(text, startPosition, matchCase);
if (res.Token == "")
return res;
if (this.CharIsSeparator(text, res.Index - 1) && this.CharIsSeparator(text, res.Index + res.Token.Length))
return res;
startPosition = res.Index + 1;
if (startPosition >= text.Length)
{
res.Token = "";
res.Index = 0;
return res;
}
}
}