Also, since posting my original question, I realised that I forgot to also ask for an unzip function which takes a zipped string and the length of $str2, and generates $str1 & $str2 from it. I guess I could do it with a verbose style similar to my original function, but would love to see more elegant, concise & efficient options. Any offers?
I would probably call it something like this:
($str1, $str2) = unzip('AaBbCcDdEeFGHIJ', 5);
Thanks again!
In reply to Re: Merge 2 strings like a zip
by tel2
in thread Merge 2 strings like a zip
by tel2
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |