Comment #0 by bearophile_hugs — 2011-02-07T14:32:50Z
This is Python 2.6.6 code (shell):
>>> "x".join("123")
'1x2x3'
This is handy in several situations. So I'd like std.string.join() to join chars in a similar way:
join("123", "x") ==> "1x2x3"
See also bug 4468
Comment #1 by bearophile_hugs — 2013-09-30T04:26:06Z
In Python and Haskell:
>>> s = "language"
>>> "|".join(s)
'l|a|n|g|u|a|g|e'
Prelude> intersperse '|' s
Prelude Data.List> intersperse '|' s
"l|a|n|g|u|a|g|e"
Comment #2 by rburners — 2014-09-16T21:44:01Z
superseded by issue 8851
Comment #3 by bearophile_hugs — 2014-09-17T05:45:56Z
(In reply to Robert Schadek from comment #2)
> superseded by issue 8851
They are different requests.
Comment #4 by jack — 2016-04-11T22:40:31Z
This is a one liner,
string input = "123";
auto result = input.roundRobin('x'.repeat(input.length - 1));
Going off of Walter's comments in this PR, https://github.com/D-Programming-Language/phobos/pull/4153, I am marking this as WONTFIX.