Commit f48eeee9 authored by Vaibhav Sagar's avatar Vaibhav Sagar

StringUtils: use Data.List.Split.splitOn

parent 17188f8c
......@@ -9,6 +9,7 @@ module StringUtils (
import IHaskellPrelude
import qualified Data.Text as T
import Data.List.Split (splitOn)
lstrip :: String -> String
lstrip = dropWhile (`elem` (" \t\r\n" :: String))
......@@ -24,4 +25,4 @@ replace needle replacement haystack =
T.unpack $ T.replace (T.pack needle) (T.pack replacement) (T.pack haystack)
split :: String -> String -> [String]
split delim = map T.unpack . T.splitOn (T.pack delim) . T.pack
split = splitOn
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment