private static String stripTrailingSlash ( String s ) { if ( s != null && s . endsWith ( "/" ) ) { s = s . substring ( 0 , s . length ( ) - 1 ) ; } return s ; }
Strip trailing slash from end of string .