Commits

Luke Plant  committed 1bedd9d

Added utility for random string generation

  • Participants
  • Parent commits 75cef1a

Comments (0)

Files changed (1)

File 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