breakOn package:stringsearch

breakOn pattern target splits target at the first occurrence of pattern. If the pattern does not occur in the target, the second component of the result is empty, otherwise it starts with pattern. If the pattern is empty, the first component is empty. For a non-empty pattern, the first component is generated lazily, thus the first parts of it can be available before the pattern has been found or determined to be absent.
uncurry append . breakOn pattern = id
breakOn pattern target splits target at the first occurrence of pattern. If the pattern does not occur in the target, the second component of the result is empty, otherwise it starts with pattern. If the pattern is empty, the first component is empty.
uncurry append . breakOn pattern = id