Commit 397231c7 authored by Ian Lynagh's avatar Ian Lynagh
Browse files

Use the standard isPrefixOf

parent 6b692919
......@@ -173,14 +173,8 @@ trim s = dropWhile isSpace s
trimr :: String -> String
trimr s = reverse (dropWhile isSpace (reverse s))
starts :: String -> String -> Bool
starts [] _ = True
starts _ [] = False
starts (a:as) (b:bs) | a == b = starts as bs
| otherwise = False
skip :: String -> String -> String
skip val s = if val `starts` (trim s) then
skip val s = if val `isPrefixOf` (trim s) then
drop (length val) (trim s)
else s
......
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