code: function inText(string, n) {
    let firstIndex = string.search(/"|'/);
    if (firstIndex === -1 || firstIndex > n) return false;
    let char = '';
    let last = '';
    for (let i = 0; i < n; i++) {
      let c = string[i];
      if (c === '"' || c === "'") {
        if (!char) {
          char = c;
        } else if (char === c && last !== '\\') {
          char = '';
        }
      }
      last = c;
    }
    return char !== '';
  }
docs: 判断字符串中指定的位置是否是被包含在引号中
  @param string
  @param n
  @returns {boolean}