blob: 5a8c7c6ffb618e81c261bef869696967ea7554b0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
-- | Miscellaneous string manipulation functions.
--
module Hakyll.Web.Util.String
( trim
) where
import Data.Char (isSpace)
-- | Trim a string (drop spaces, tabs and newlines at both sides).
--
trim :: String -> String
trim = reverse . trim' . reverse . trim'
where
trim' = dropWhile isSpace
|