List of utility methods to do String Ends With
boolean | endsWith(String str, String suffix) ends With if (str == null || suffix == null) { return false; return str.endsWith(suffix); |
boolean | endsWith(StringBuilder stringBuilder, String suffix) ends With if (suffix.length() > stringBuilder.length()) return false; for (int i = 0; i < suffix.length(); i++) { char mustCharacter = suffix.charAt(i); char isCharacter = stringBuilder.charAt(stringBuilder.length() - suffix.length() + i); if (mustCharacter != isCharacter) { return false; ... |