Best shuffle: Difference between revisions

Undo revision 144122 by Fwend (talk)
(Undo revision 144122 by Fwend (talk))
Line 1,057:
 
auto bestShuffle(S)(in S orig) if (isSomeString!S) {
static if (isNarrowString!S)
auto s = to!(dchar[])(o);
auto o = to!dstring(orig);
else alias orig o;
 
auto s = to!(dchar[])(o).dup;
randomShuffle(s);
foreach (i, ref ci; s) {
Anonymous user