Hi, I wanted to replace all the letters in a string with a random number of that letter e.g. "cat" becomes "cccaaaat" or "ccaaaaattttt". I've done this by splitting the string into an array, using a foreach to go over it and then joining it together at the end. I was just interested to know if there was a simpler way of doing this.
Thanks in advance
In reply to Function over all letters in a string by Jobby
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |