docs: function nearestCharAfter(char, str, index) {
    // Find the nearest char index before given index. skip white space strings
    // If not found, return -1
    let i = index + 1;
    while (i < str.length) {
      if (str.charAt(i) === char) return i;
      if (!/\s/.test(str.charAt(i))) return -1;
      i += 1;
    }
    return -1;
  }