Method: PropCheck::Generators.printable_ascii_string
- Defined in:
- lib/prop_check/generators.rb
.printable_ascii_string(**kwargs) ⇒ Object
Generates strings from the printable ASCII character set.
Shrinks towards fewer characters, and towards ‘ ’.
>> Generators.printable_ascii_string.sample(5, size: 10, rng: Random.new(42))
=> ["S|.g", "rvjjw7\"5T!", "=", "!_[4@", "Y"]
Accepts the same options as array
539 540 541 |
# File 'lib/prop_check/generators.rb', line 539 def printable_ascii_string(**kwargs) array(printable_ascii_char, **kwargs).map(&:join) end |