Commits

Luke Plant committed 1bedd9d

Added utility for random string generation

Comments (0)

Files changed (1)

src/ConfirmCgi.hs

 -- -- Admin URLs
 
 
+-- Utilities
+
+randomStr :: Int -> IO String
+randomStr n = do
+    g <- newStdGen
+    return $ take n (randomRs chars g)
+  where chars = ('a','z')
 
 -- Main