Tokenizer.ProbeString C# (CSharp) Method

ProbeString() private method

private ProbeString ( string &str ) : bool
str string
return bool
    private bool ProbeString(ref string str)
    {
      int delimiterChar;
      delimiterChar = Peek();
      if (delimiterChar == '"' || delimiterChar == '\'') 
      {
        System.Text.StringBuilder sb = new System.Text.StringBuilder();
        ReadChar();
        int ch = ReadChar();
        while (ch != delimiterChar && ch != -1) 
        {
          if (ch == '\\') 
          {
            ch = ReadChar();
          }
          sb.Append((char)ch);
          ch = ReadChar();
        }
        if (ch == -1) 
        {
          _read = delimiterChar + sb.ToString();
          return false;
        }
        str = sb.ToString();
        return true;
      } 
      else 
      {
        return false;
      }
    }