From a302dfc2aabda53446fb38e035e61ae91b28f84a Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Sat, 4 Oct 2025 18:07:30 +0530 Subject: Add multi-key handling + command parsing + shell/shell! aliases --- lib/Daffm/Utils.hs | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 lib/Daffm/Utils.hs (limited to 'lib/Daffm/Utils.hs') 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 -- cgit v1.3.1