3 ms·
To clarify, foreach (s; vec) works if you don't need the index. To be able to modify s in place: foreach (ref s; vec) s = "replacement";
by WalterBright 3mo ago
To clarify,
foreach (s; vec)
works if you don't need the index. To be able to modify s in place:
foreach (ref s; vec) s = "replacement";
- xigoi 3mo agoI was talking about Go. I know you don’t need the index in D.