On Thursday, 28 July 2022 at 19:37:31 UTC, rikki cattermole wrote:
I don't know of a D version, although it should be pretty easy
to write up yourself.
But you can always use strtok itself.
https://github.com/dlang/dmd/blob/09d04945bdbc0cba36f7bb1e19d5bd009d4b0ff2/druntime/src/core/stdc/string.d#L97
Very similar to example given on the docs:
```d
void main()
{
import std.stdio, std.algorithm;
string input = "one + two * (three - four)!";
string delimiters = "!+-(*)";
foreach(value; input.splitWhen!((a, b) =>
delimiters.canFind(b))) {
writeln(value);
}
}
```
From where can I get details about properties like "canFind" and
"splitWhen" or other properties. The next link has mentioning for
more properties:
https://dlang.org/spec/arrays.html