shuffle a character array
pineapple via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Wed Jul 20 03:40:04 PDT 2016
On Wednesday, 20 July 2016 at 08:02:07 UTC, Mike Parker wrote:
> You can then go to the documentation for
> std.range.primitives.isRandomAccessRange [2], where you'll find
> the following:
>
> "Although char[] and wchar[] (as well as their qualified
> versions including string and wstring) are arrays,
> isRandomAccessRange yields false for them because they use
> variable-length encodings (UTF-8 and UTF-16 respectively).
> These types are bidirectional ranges only."
There's also the shuffle module in mach.range which doesn't do
any auto-decoding:
https://github.com/pineapplemachine/mach.d/blob/master/mach/range/random/shuffle.d
More information about the Digitalmars-d-learn
mailing list