netdzynr
You function sometimes produces results like "hellowXrld" when limit field is set to 3.
Here is a slightly shorter version:
The word should contain at least 3 letters, otherwise it will go into an infinite loop.
You can add another condition to the While loop, for example "Loopindex<50" to prevent this from happening.