code: public static String addEndingSlash(String string) {
          if (string == null) {
              return null;
          }
          if (!string.endsWith("/")) {
              string += "/";
          }
          return string;
      }
docs: Adds ending slash if it is not present.
  
  @param string
  @return