ints.choice vs. chars.choice

Daniel Kozak kozzi11 at gmail.com
Mon Nov 18 18:35:18 UTC 2019


On Mon, Nov 18, 2019 at 7:25 PM Steven Schveighoffer via
Digitalmars-d-learn <digitalmars-d-learn at puremagic.com> wrote:
>
>
> You could also use cast(dchar[]), and avoid the cast back to char.
>
> -Steve

or use byCodeUnit

writeln(['a', 'b', 'c'].byCodeUnit.choice);


More information about the Digitalmars-d-learn mailing list