How to loop through characters of a string in D language?
forkit at gmail.com
Fri Dec 10 00:32:29 UTC 2021
On Thursday, 9 December 2021 at 18:00:42 UTC, kdevel wrote:
> - saves two lines of boilerplate code
> - raw loop
> - postinc ++ is only permitted in ++C
> - inconsistent spacing around "="
> - mixing tabs and spaces for indentation
> - arrow code
- You become less dependent on someone else's library.
- You learn how to do some things yourself.
of course, I would prefer a less verbose, and safer version,
which D enables, such as:
if (val != ';')
b ~= val;
More information about the Digitalmars-d-learn