docs: @SuppressWarnings({ "PMD.AssignmentInOperand",
          "PMD.AvoidLiteralsInIfCondition" })
      public static String[] split(String path, int segments) {
          StringBuilder prefix = new StringBuilder();
          StringBuilder suffix = new StringBuilder();
          int[] count = { 0 };
          PathSpliterator.stream(path).forEach(seg -> {
              if (count[0]++ < segments) {
                  if (count[0] > 1) {
                      prefix.append('/');
                  }
                  prefix.append(seg);
              } else {
                  if (count[0] > segments + 1) {
                      suffix.append('/');
                  }
                  suffix.append(seg);
              }
          });
          return new String[] { prefix.toString(), suffix.toString() };
      }