aboutsummaryrefslogtreecommitdiff
path: root/lib/Daffm/Utils.hs
diff options
context:
space:
mode:
authorAkshay Nair <phenax5@gmail.com>2025-10-04 18:07:30 +0530
committerAkshay Nair <phenax5@gmail.com>2025-10-04 19:10:06 +0530
commita302dfc2aabda53446fb38e035e61ae91b28f84a (patch)
tree67ca03f33ebf31e198ac5a883100b96cc387f264 /lib/Daffm/Utils.hs
parentb05be850349dbb813d2af6f3ee7a2fc3bf98b8ef (diff)
downloaddaffm-a302dfc2aabda53446fb38e035e61ae91b28f84a.tar.gz
daffm-a302dfc2aabda53446fb38e035e61ae91b28f84a.zip
Add multi-key handling + command parsing + shell/shell! aliases
Diffstat (limited to 'lib/Daffm/Utils.hs')
-rw-r--r--lib/Daffm/Utils.hs13
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