diff options
Diffstat (limited to '')
| -rw-r--r-- | lib/Daffm/Utils.hs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/Daffm/Utils.hs b/lib/Daffm/Utils.hs new file mode 100644 index 0000000..af4e0b2 --- /dev/null +++ b/lib/Daffm/Utils.hs @@ -0,0 +1,13 @@ +module Daffm.Utils where + +import Data.Char (isSpace) +import qualified Data.Text as Text + +trimStart :: Text.Text -> Text.Text +trimStart = Text.dropWhile isSpace + +trimEnd :: Text.Text -> Text.Text +trimEnd = Text.dropWhileEnd isSpace + +trim :: Text.Text -> Text.Text +trim = trimStart . trimEnd |
