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