This post is part of a series of posts on implementing a minimal version of QuickCheck from scratch. The source code is available on GitHub.
In this post I’ll be generating random strings from randomly selected characters. I will also describe a way of customizing the whole creation process.
The following generators are required for this:
Given the above, a generator for strings can be written as:
Here are some sample strings:
Generarting upper-case strings
Generating lower-case strings