summaryrefslogtreecommitdiff
path: root/Coolbal/Util.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Coolbal/Util.hs')
-rw-r--r--Coolbal/Util.hs6
1 files changed, 6 insertions, 0 deletions
diff --git a/Coolbal/Util.hs b/Coolbal/Util.hs
new file mode 100644
index 0000000..f617614
--- /dev/null
+++ b/Coolbal/Util.hs
@@ -0,0 +1,6 @@
+module Coolbal.Util where
+
+
+genericEscapeString :: (Char -> Bool) -> (Char -> String) -> String -> String
+genericEscapeString isReserved escape =
+ concatMap (\c -> if isReserved c then escape c else [c])