AGS.Editor.ScintillaWrapper.ReadNextWord C# (CSharp) Метод

ReadNextWord() приватный Метод

private ReadNextWord ( string &pathedExpression ) : string
pathedExpression string
Результат string
        private string ReadNextWord(ref string pathedExpression)
        {
            string thisWord = string.Empty;
            while ((pathedExpression.Length > 0) &&
                ((Char.IsLetterOrDigit(pathedExpression[0])) || (pathedExpression[0] == '_')))
            {
                thisWord += pathedExpression[0];
                pathedExpression = pathedExpression.Substring(1);
            }
            if ((pathedExpression.Length > 0) && (pathedExpression[0] == '['))
            {
                int bracketDepth = 1;
                int cursorPos = 1;
                while ((bracketDepth > 0) && (cursorPos < pathedExpression.Length))
                {
                    int checkChar = pathedExpression[cursorPos];
                    if (checkChar == ']') bracketDepth--;
                    if (checkChar == '[') bracketDepth++;
                    cursorPos++;
                }
                pathedExpression = pathedExpression.Substring(cursorPos);
            }
            if ((pathedExpression.Length > 0) && (pathedExpression[0] == '.'))
            {
                pathedExpression = pathedExpression.Substring(1);
            }
            return thisWord;
        }
ScintillaWrapper