JAL-4313 Change default trim end to (length - 1)