On Monday, 27 August 2018 at 11:56:08 UTC, Kamil Koczurek wrote:
Mixins seem to be an overkill here. Maybe something like this
would suffice:
data[index + 1 .. index + 5].map!(k => k[0]).array == ""
Here there is dynamic code, with memory allocs.
I found solution:
---
On Monday, 27 August 2018 at 11:52:02 UTC, Andrey wrote:
Hello again,
I have this part of code:
...
if(index + 3 >= data.length || data[index + 1][0] == '&' ||
data[index + 2][0] == '&' || data[index + 3][0] == '&' ||
data[index + 4][0] == '&')
{
writeln("Some text...");
}
I don't want t
Hello again,
I have this part of code:
...
if(index + 3 >= data.length || data[index + 1][0] == '&' ||
data[index + 2][0] == '&' || data[index + 3][0] == '&' ||
data[index + 4][0] == '&')
{
writeln("Some text...");
}
I don't want to write manually these four "or" conditions because
in ea