private static int indexOf(@NotNull CharSequence s, int start, int end) {
    end = Math.min(end, s.length());
    for (int i = Math.max(start, 0); i < end; i++) {
      if (s.charAt(i) == '%') {
        return i;
      }
    }
    return -1;
  }
private static int indexOf(@NotNull CharSequence s, int start, int end)