jodd-core/src/main/java/jodd/util/StringUtil.java
public static String stripTrailingChar(final String string, final char c) {
		if (string.length() > 0) {
			if (string.charAt(string.length() - 1) == c) {
				return string.substring(0, string.length() - 1);
			}
		}
		return string;
	}
public static String stripTrailingChar(final String string, final char c) {
		if (string.length() > 0) {
			if (string.charAt(string.length() - 1) == c) {
				return string.substring(0, string.length() - 1);
			}
		}
		return string;
	}
Strips trailing char if string ends with one.