trimsuffix Function

trimsuffix removes the specified suffix from the end of the given string.

Examples

> trimsuffix("helloworld", "world")
hello