On Thursday, 13 January 2022 at 20:32:40 UTC, Stanislav Blinov
wrote:
On Thursday, 13 January 2022 at 19:52:27 UTC, forkit wrote:
Any idea on how I can get a ptr (without hardcoding C style)
e.g. something like this:
immutable(string)*[] pointers = strings.filter!(x => x ==
"one").to!pointer
On Thursday, 13 January 2022 at 19:52:27 UTC, forkit wrote:
Any idea on how I can get a ptr (without hardcoding C style)
e.g. something like this:
immutable(string)*[] pointers = strings.filter!(x => x ==
"one").to!pointers.array;
```d
import std.stdio : writeln;
import std.algorithm : filt
On Wednesday, 12 January 2022 at 06:16:49 UTC, vit wrote:
Yes std.algorithm : filter.
```d
import std.stdio : writeln;
import std.algorithm : filter;
void main()@safe{
auto a = ["one", "one", "two", "one", "two", "one",
"one", "two"];
writeln(a);
writeln(a.filter
On Wednesday, 12 January 2022 at 06:58:47 UTC, vit wrote:
On Wednesday, 12 January 2022 at 06:43:40 UTC, forkit wrote:
On Wednesday, 12 January 2022 at 06:16:49 UTC, vit wrote:
Yes std.algorithm : filter.
```d
import std.stdio : writeln;
import std.algorithm : filter;
void main()@safe{
On Wednesday, 12 January 2022 at 06:43:40 UTC, forkit wrote:
On Wednesday, 12 January 2022 at 06:16:49 UTC, vit wrote:
Yes std.algorithm : filter.
```d
import std.stdio : writeln;
import std.algorithm : filter;
void main()@safe{
auto a = ["one", "one", "two", "one", "two", "one",
On Wednesday, 12 January 2022 at 06:16:49 UTC, vit wrote:
Yes std.algorithm : filter.
```d
import std.stdio : writeln;
import std.algorithm : filter;
void main()@safe{
auto a = ["one", "one", "two", "one", "two", "one",
"one", "two"];
writeln(a);
writeln(a.filter
On Wednesday, 12 January 2022 at 05:27:08 UTC, forkit wrote:
I am familiar with the concept of a slice in D.
However, a slice is a consecutive slice, is in not? (e.g)
[4..$-1]
I would like a slice (or a view, or whatever name you wanna
call it), of particular elements within an array that ma
I am familiar with the concept of a slice in D.
However, a slice is a consecutive slice, is in not? (e.g) [4..$-1]
I would like a slice (or a view, or whatever name you wanna call
it), of particular elements within an array that may not be
consecutive. e.g. [4-7,8,10,13-16]
Consider below: