List of utility methods to do String Ends With
boolean | endsWithChar(String s, char c) ends With Char if (s.length() == 0) { return false; return s.charAt(s.length() - 1) == c; |
boolean | endsWithChar(String string, char suffix) Tests if this string ends with the specified suffix. return string.length() > 0 && string.charAt(string.length() - 1) == suffix;
|
boolean | endsWithChar(String string, int character) Return true if the given string ends with the given character. int length = string.length(); return length > 0 && string.charAt(length - 1) == character; |
boolean | endsWithContinuationMarker(String line) ends With Continuation Marker boolean evenSlashCount = true; int index = line.length() - 1; while (index >= 0 && line.charAt(index) == '\\') { evenSlashCount = !evenSlashCount; index--; return !evenSlashCount; |
boolean | endsWithCVC(String str) ends With CVC char c; char v; char c2; if (str.length() >= 3) { c = str.charAt(str.length() - 1); v = str.charAt(str.length() - 2); c2 = str.charAt(str.length() - 3); } else { ... |
boolean | endsWithDigit(final String s) ends With Digit if (!isEmpty(s)) { return Character.isDigit(s.charAt(s.length() - 1)); return false; |
boolean | endsWithDoubleConsonent(String str) ends With Double Consonent char c = str.charAt(str.length() - 1); if (str.length() > 1 && c == str.charAt(str.length() - 2)) { if (!containsVowel(str.substring(str.length() - 2))) { return true; return false; |
boolean | endsWithExtension(final String fileName, final String extension) ends With Extension return fileName != null && fileName.toLowerCase().endsWith(extension.toLowerCase());
|
boolean | endsWithFFD9(byte[] data) ends With FFD return (data[data.length - 2] & 0xFF) == 255 && (data[data.length - 1] & 0xFF) == 217;
|
boolean | endsWithGaps(final byte[] aFrag, final int numEndGaps) ends With Gaps for (int i = 1; i <= numEndGaps; i++) { if (i <= 0) { return true; if (!isGap(aFrag[aFrag.length - i])) { return false; return true; |