What is the best way to refer to itself when obtaining Substring of a literal?

SrMordred patric.dexheimer at gmail.com
Sat Apr 25 03:47:33 UTC 2020


On Friday, 24 April 2020 at 22:24:34 UTC, Marcone wrote:
> I don't want to use lambda.
> I don't want create variable.
>
> What is the best way to refer to itself when obtaining 
> Substring withou using lambda and without create variable?
>
>
> example:
>
> writeln("Hello Word!"[x.indexOf(" "), $]);

Maybe u want this?

import std.algorithm: find;
import std.stdio: writeln;

"Hello World".find(" ").writeln;


More information about the Digitalmars-d-learn mailing list