jodd-core/src/main/java/jodd/util/StringUtil.java
public static String replaceLast(final String s, final char sub, final char with) {
		int index = s.lastIndexOf(sub);
		if (index == -1) {
			return s;
		}
		char[] str = s.toCharArray();
		str[index] = with;
		return new String(str);
	}
public static String replaceLast(final String s, final char sub, final char with) {
		int index = s.lastIndexOf(sub);
		if (index == -1) {
			return s;
		}
		char[] str = s.toCharArray();
		str[index] = with;
		return new String(str);
	}
Replaces the very last occurrence of a character in a string.

@param s      string
@param sub    char to replace
@param with   char to replace with