Generate a cipher given a number and string
Your task is simple. Given a string s
and a number 0 <= n <= 9
as inputs, insert a randompseudo-random printable ASCII character between each character of the string n
times. Such that for each character of s
there are n
random characters between them. Spaces should be trimmed.
Input:
- string
s
phrase to encrypt in the cipher - integer
n
in the range of0 <= n <= 9
Example:
Input:
The treasure is here
2
Output:
T!0h32eF4t0irlkehma7ys#0u*&r*he!2iH^sB,h!@e0)r$he
This is code-golf so the shortest code wins! Good Luck and have fun!