private int FindEndOfPreviousWord(int p)
{
if (p != 0)
{
p--;
while ((p > 0) && (this.text[p] == ' '))
{
p--;
}
CharacterType type = this.ClassifyChar(this.text[p]);
if (type != CharacterType.WhiteSpace)
{
while ((p > 0) && (this.ClassifyChar(this.text[p - 1]) == type))
{
p--;
}
}
}
return p;
}