trimprefix Function

trimprefix removes the specified prefix from the start of the given string. If the string does not start with the prefix, the string is returned unchanged.

Examples

> trimprefix("helloworld", "hello")
world
> trimprefix("helloworld", "cat")
helloworld