Generating random strings (for testing)

While converting some of my objective-c application towards swift, I also needed to port the generation of randome strings to swift. I use random strings during development to debug length of labels, buttons… to see if the UI scales nicely. In effect I use it to generate dummy data in my model.

After doing some research, I came up with the following 3 different functions:

Usage:

Generating random strings (for testing)