splitOn

splitOn :: Text -> Text -> [Text]
text Data.Text
O(m+n) Break a Text into pieces separated by the first Text argument, consuming the delimiter. An empty delimiter is invalid, and will cause an error to be raised. Examples: > splitOn "\r\n" "a\r\nb\r\nd\r\ne" == ["a","b","d","e"] > splitOn "aaa" "aaaXaaaXaaaXaaa" == ["","X","X","X",""] > splitOn "x" "x" == ["",""] and > intercalate s . splitOn s == id > splitOn (singleton c) == split (==c) In (unlikely) bad cases, this function's time complexity degrades towards O(n*m).
splitOn :: Text -> Text -> [Text]
text Data.Text.Lazy
O(m+n) Break a Text into pieces separated by the first Text argument, consuming the delimiter. An empty delimiter is invalid, and will cause an error to be raised. Examples: > splitOn "\r\n" "a\r\nb\r\nd\r\ne" == ["a","b","d","e"] > splitOn "aaa" "aaaXaaaXaaaXaaa" == ["","X","X","X",""] > splitOn "x" "x" == ["",""] and > intercalate s . splitOn s == id > splitOn (singleton c) == split (==c) This function is strict in its first argument, and lazy in its second. In (unlikely) bad cases, this function's time complexity degrades towards O(n*m).