module Data.List.Extra (trim) where
import Data.Char (isSpace)
import Data.List (dropWhileEnd)
trim :: String -> String
trim :: String -> String
trim = String -> String
trimEnd (String -> String) -> (String -> String) -> String -> String
forall b c a. (b -> c) -> (a -> b) -> a -> c
. String -> String
trimStart
trimStart :: String -> String
trimStart :: String -> String
trimStart = (Char -> Bool) -> String -> String
forall a. (a -> Bool) -> [a] -> [a]
dropWhile Char -> Bool
isSpace
trimEnd :: String -> String
trimEnd :: String -> String
trimEnd = (Char -> Bool) -> String -> String
forall a. (a -> Bool) -> [a] -> [a]
dropWhileEnd Char -> Bool
isSpace