private static int stripPrefix(@NotNull String key) {
    while (key.startsWith("/")) {
      key = key.substring(1);
    }
    return key.length();
  }
private static int stripPrefix(@NotNull String key)