Here you can find the source of endsWithoutSlash(String url)
public static String endsWithoutSlash(String url)
//package com.java2s; //License from project: Open Source License public class Main { public static String endsWithoutSlash(String url) { return url.endsWith("/") ? url.substring(0, url.length() - 1) : url; }//from w ww . j a v a2s. c o m }