Yes that would break on large strings..Was wondering what went wrong!My senior Dileep pointed it correctly..Actually the while condition wasn't correct. Have to check the string length each time. This would fix it..hope so.. :) .
Yeah, I tried that one too. I think it works. But it did leave a trailing slash when the # of chars are divisible by 5 ...I think. I was too lazy to trim it. So I went with listAppend(). But insert's probably better performance :)