System.Data.ExpressionParser.ScanString C# (CSharp) Method

ScanString() private method

private ScanString ( char escape ) : void
escape char
return void
        private void ScanString(char escape)
        {
            char[] text = _text;

            while (_pos < text.Length)
            {
                char ch = text[_pos++];

                if (ch == escape && _pos < text.Length && text[_pos] == escape)
                {
                    _pos++;
                }
                else if (ch == escape)
                    break;
            }

            if (_pos >= text.Length)
            {
                throw ExprException.InvalidString(new string(text, _start, (_pos - 1) - _start));
            }

            _token = Tokens.StringConst;
        }