in reply to Merge 2 strings like a zip
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!
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Merge 2 strings like a zip [unzip()]
by kcott (Archbishop) on Jul 09, 2015 at 05:53 UTC | |
by tel2 (Pilgrim) on Jul 09, 2015 at 07:08 UTC | |
by kcott (Archbishop) on Jul 09, 2015 at 14:18 UTC | |
by tel2 (Pilgrim) on Jul 10, 2015 at 00:39 UTC | |
by kcott (Archbishop) on Jul 10, 2015 at 04:35 UTC | |
| |
by hexcoder (Curate) on Jul 09, 2015 at 08:09 UTC | |
by Anonymous Monk on Jul 09, 2015 at 08:24 UTC |