I need a string that is str_len
characters long for testing.
What ways are there that are more elegant (and possibly faster) ways of building it than the following:
long_str = ''
(str_len + 1).times do
long_str << 'a'
end
It would be helpful if the algorithm could also randomise the content of the string (i.e. use any character).