docs: public static String removeTrailingSeparator(String path) {
  
          int l = path.length();
          if ((l <= 1) || (path.charAt(l - 1) != '/')) {
              return path;
          } else {
              return path.substring(0, l - 1);
          }
      }