public static boolean endsWith ( String str , char suffix ) { return str != null && str . length ( ) > 0 && str . charAt ( str . length ( ) - 1 ) == suffix ; }
Tests if this string ends with the specified suffix .