-- Copyright 2023 Evan Laforge
-- This program is distributed under the terms of the GNU General Public
-- License 3.0, see COPYING or http://www.gnu.org/licenses/gpl-3.0.txt

module Util.Strings (lstrip, rstrip, strip) where
import qualified Data.Char as Char
import qualified Data.List as List


lstrip, rstrip, strip :: String -> String
lstrip :: String -> String
lstrip = forall a. (a -> Bool) -> [a] -> [a]
dropWhile Char -> Bool
Char.isSpace
rstrip :: String -> String
rstrip = forall a. (a -> Bool) -> [a] -> [a]
List.dropWhileEnd Char -> Bool
Char.isSpace
strip :: String -> String
strip = String -> String
rstrip forall b c a. (b -> c) -> (a -> b) -> a -> c
. String -> String
lstrip