The random-strings package

This is a package candidate release! Here you can preview how this package release will appear once published to the main package index (which can be accomplished via the 'maintain' link below). Please note that once a package has been published to the main package index it cannot be undone! Please consult the package uploading documentation for more information.

[maintain]

Useful for generating test/benchmark data, the Test.RandomStrings module provides functions for generating random character strings in the ASCII range. You can specify probabilities for the alphabet-range chars and capital case characters.


[Skip to ReadMe]

Properties

Versions0.1.0.0, 0.1.0.0, 0.1.1.0
Change logCHANGELOG
Dependenciesbase (==4.*), random (>=1.0 && <2.0), random-strings [details]
LicenseBSD3
Copyright(c) 2016 Michael Hatfield
AuthorMichael Hatfield
Maintainergithub@michael-hatfield.com
CategoryText , Test
Home pagehttps://github.com/mikehat/random-strings
Bug trackerhttps://github.com/mikehat/random-strings
Source repositoryhead: git clone git://github.com/mikehat/random-strings.git -b master
this: git clone git://github.com/mikehat/random-strings.git -b master(tag 0.1)
Executablesreadme-example
UploadedTue Jul 26 06:48:43 UTC 2016 by mikehat

Modules

[Index]

Downloads

Maintainers' corner

For package maintainers and hackage trustees


Readme for random-strings-0.1.0.0

[back to package description]

Package random-strings.

A simple way to generate random strings for testing and benchmarking.

A purely random character string is not always the best test case for testing and benchmarking. These modules help generate random strings with preferences for character sets and character properties.

Example:

module Main ( main ) where

import Test.RandomStrings

iso_alpha = onlyAlpha randomChar8
ascii_alphanum = onlyAlphaNum randomASCII

-- print a list of 30 random alphanumeric strings between 5 and 25
-- chars long.

main = do
    words <- randomStringsLen (randomString ascii_alphanum) (5,25) 30
    mapM_ putStrLn words

Build the example with cabal build readme-example.

Functions allow tuning strings for character class and toying with the distribution of alphabetic and upper/lower-case characters.