Added support for character subs

Added support for character substitutions, and updated the
documentation to give more detail about how random functions work.