static String getShortName ( String url ) { int lastSlash = url . lastIndexOf ( ' ' ) ; if ( lastSlash < 0 ) { lastSlash = url . lastIndexOf ( ' ' ) ; } String shortName = url ; if ( lastSlash >= 0 && lastSlash + 1 < url . length ( ) ) { shortName = url . substring ( lastSlash + 1 ) ; } return shortName ; }
Returns a short version of the given URL .