Generating Strings with Random Contents

bearophile via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Jul 14 15:32:22 PDT 2014


Brad Anderson:

> Alternative:
>
> randomSample(lowercase, 10, lowercase.length).writeln;

 From randomSample docs:

>Selects a random subsample out of r, containing exactly n 
>elements. The order of elements is the same as in the original 
>range.<

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list