public CharBuffer trimCharEnd(final char c) {
        while ((start < end) && (buffer[end - 1] == c)) {
            end--;
        }
        return this;
    }
Trims off the specified char from the end of the buffer.
stroom-util/src/main/java/stroom/util/CharBuffer.java