public static void escapeChar(@NotNull StringBuilder buf, char character) {
    int idx = 0;
    while ((idx = indexOf(buf, character, idx)) >= 0) {
      buf.insert(idx, "\\");
      idx += 2;
    }
  }
public static void escapeChar(@NotNull StringBuilder buf, char character)