List of utility methods to do String Ends With
boolean | endsWith(String s, String end) ends With if ((s == null) || (end == null)) { return false; if (end.length() > s.length()) { return false; String temp = s.substring(s.length() - end.length(), s.length()); if (temp.equalsIgnoreCase(end)) { ... |
boolean | endsWith(String s, String end) ends With if ((s == null) || (end == null)) { return false; if (end.length() > s.length()) { return false; String temp = s.substring(s.length() - end.length(), s.length()); if (temp.equalsIgnoreCase(end)) { ... |
boolean | endsWith(String s, String end) Returns true if the string ends with the string end .
if ((s == null) || (end == null)) { return false; if (end.length() > s.length()) { return false; String temp = s.substring(s.length() - end.length()); if (temp.equalsIgnoreCase(end)) { ... |
boolean | endsWith(String s, String ending) ends With if (ending == null) { return true; if (s == null || s.length() < ending.length()) { return false; return s.substring(s.length() - ending.length()).equals(ending); |
boolean | endsWith(String s, String suffix) ends With if (s == null) { return false; for (int i = s.length() - 1; i >= 0; i--) { if (Character.isWhitespace(s.charAt(i))) { continue; } else { return s.regionMatches(i - suffix.length() + 1, suffix, 0, suffix.length()); ... |
boolean | endsWith(String s1, String s2) ends With if (s1 == null) { if (s2 == null) { return true; } else { return false; } else { if (s2 == null) { ... |
boolean | endsWith(String source, String target, boolean caseSensitive) ends With boolean result = false; if (!isEmpty(source) && !isEmpty(target) && source.length() >= target.length()) { if (caseSensitive) { result = target.equals(source.substring(source.length() - target.length(), source.length())); } else { result = target .equalsIgnoreCase(source.substring(source.length() - target.length(), source.length())); return result; |
boolean | endsWith(String str, char c) ends With return str.length() > 0 && str.charAt(str.length() - 1) == c;
|
boolean | endsWith(String str, char suffix) Tests if this string ends with the specified suffix. return str != null && str.length() > 0 && str.charAt(str.length() - 1) == suffix;
|
boolean | endsWith(String str, char suffix) ends With if (str == null || str.isEmpty()) return false; return (str.charAt(str.length() - 1) == suffix); |