Looking for an equivalent to C++ std::getline in D

k-five via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue May 9 01:17:16 PDT 2017


On Monday, 8 May 2017 at 21:37:17 UTC, Ali Çehreli wrote:
> On 05/06/2017 02:24 AM, Stanislav Blinov wrote:
>------------------------------------------------

It may D has this philosophy as Perl has: There's more than one 
way to do it

I found more than 5 ways.

another way:

string[] input = [ "", "", "", "", "" ];  // reserve for 5 
elements
args[ 1 ].split( '/' ).remvoe!( element => element.empty ).copy( 
input );

Thanks anyway


More information about the Digitalmars-d-learn mailing list