List of utility methods to do String Ends With
boolean | endsWithIgnoreCase(String p_sStr, String p_sSubStr) Same as String#endsWith(String) , but ignoring case if (p_sSubStr.length() > p_sStr.length()) return false; int nSubStrLen = p_sSubStr.length(); int nStrLen = p_sStr.length(); int nIdx = 1; for (int i = nSubStrLen - 1; i >= 0; i--) { char cSubStr = p_sSubStr.charAt(i); char cStr = p_sStr.charAt(nStrLen - nIdx); ... |
boolean | endsWithIgnoreCase(String s, String suffix) Check if a String ends with a specified suffix, ignoring case if (s == null || suffix == null) { return (s == null && suffix == null); if (suffix.length() > s.length()) { return false; return s.regionMatches(true, s.length() - suffix.length(), suffix, 0, suffix.length()); |
boolean | endsWithIgnoreCase(String s, String suffix) ends With Ignore Case return s.regionMatches(true, s.length() - suffix.length(), suffix, 0, suffix.length());
|
boolean | endsWithIgnoreCase(String s, String w) ends With Ignore Case if (w == null) return true; int sl = s.length(); int wl = w.length(); if (s == null || sl < wl) return false; for (int i = wl; i-- > 0;) { char c1 = s.charAt(--sl); ... |
boolean | endsWithIgnoreCase(String seq, String suffix) Tests if this string sequence ends with the specified suffix. return seq.toLowerCase().endsWith(suffix.toLowerCase());
|
boolean | endsWithIgnoreCase(String source, String eq) ends With Ignore Case int temp = eq.length(); if (eq.length() > source.length()) { return false; return source.substring(source.length() - temp).equalsIgnoreCase(eq); |
boolean | endsWithIgnoreCase(String str, String suffix) ends With Ignore Case final int stringLength = str.length(); final int suffixLength = suffix.length(); return stringLength >= suffixLength && str.regionMatches(true, stringLength - suffixLength, suffix, 0, suffixLength); |
boolean | endsWithIgnoreCase(String str, String suffix) ends With Ignore Case return endsWith(str, suffix, true);
|
boolean | endsWithIgnoreCase(String str, String suffix) Test if the given String ends with the specified suffix, ignoring upper/lower case. return (str != null && suffix != null && str.length() >= suffix.length()
&& str.regionMatches(true, str.length() - suffix.length(), suffix, 0, suffix.length()));
|
boolean | endsWithIgnoreCase(String str, String suffix)StringUtilities.endsWithIgnoreCase(null, null) = true StringUtilities.endsWithIgnoreCase(null, "def") = false StringUtilities.endsWithIgnoreCase("abcdef", null) = false StringUtilities.endsWithIgnoreCase("abcdef", "def") = true StringUtilities.endsWithIgnoreCase("ABCDEF", "def") = true StringUtilities.endsWithIgnoreCase("ABCDEF", "cde") = false return endsWith(str, suffix, true);
|