on e07014b help sign in
hakyll/src/Hakyll/Web/Util/String.hs
14 lines 309 B history raw
1-- | Miscellaneous string manipulation functions.
2--
3module Hakyll.Web.Util.String
4 ( trim
5 ) where
7import Data.Char (isSpace)
9-- | Trim a string (drop spaces, tabs and newlines at both sides).
10--
11trim :: String -> String
12trim = reverse . trim' . reverse . trim'
13 where
14 trim' = dropWhile isSpace