single loop copy in D

psychoticRabbit meagain at meagain.com
Fri Mar 2 10:13:50 UTC 2018


On Friday, 2 March 2018 at 10:08:57 UTC, Simen Kjærås wrote:
>
> This is of course only partly true.
>
> while ((*dst++ = *src++) != 0) {}
>
> works just great, and also better shows what's actually being 
> tested for in the loop.
>
> --
>   Simen

That's what I was after. Thanks!



More information about the Digitalmars-d-learn mailing list