stripPrefix package:base

The stripPrefix function drops the given prefix from a list. It returns Nothing if the list did not start with the prefix given, or Just the list after the prefix, if it does.
Examples
>>> stripPrefix "foo" "foobar"
Just "bar"
>>> stripPrefix "foo" "foo"
Just ""
>>> stripPrefix "foo" "barfoo"
Nothing
>>> stripPrefix "foo" "barfoobaz"
Nothing