UnityEngine.TextEditor.FindEndOfPreviousWord C# (CSharp) Method

FindEndOfPreviousWord() private method

private FindEndOfPreviousWord ( int p ) : int
p int
return int
        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;
        }