code: public static String stripTrailingSlash(String string) {
          if (string == null) {
              return null;
          }
          if (string.startsWith("/")) {
              string = string.substring(1, string.length());
          }
          return string;
      }
docs: Remove ending slash if present and return the string without ending slash
  
  @param string
  @return