(x:_) -> (textP arr off x, textP arr (off+x) (len-x))
+-- | /O(n+m)/ Similar to 'break', but searches from the end of the string.
+-- The first element of the returned tuple is the prefix of @haystack@
+-- up to and including the last match of @needle@. The second is the
+-- remainder of @haystack@, following the match.
+-- > breakEnd "::" "a::b::c" ==> ("a::b::", "c")
+breakEnd :: Text -> Text -> (Text, Text)
+breakEnd pat src = let (a,b) = break (reverse pat) (reverse src)
+ in (reverse b, reverse a)
-- | /O(n+m)/ Find all non-overlapping instances of @needle@ in
-- @haystack@. The first element of the returned pair is the prefix
-- of @haystack@ prior to any matches of @needle@. The second is a