Re: strip in stdin

2020-12-04 Thread Paul Backus via Digitalmars-d-learn
On Friday, 4 December 2020 at 06:51:32 UTC, MGW wrote: string[] m = stdin.byLineCopy.array; How to make strip() for each line in an expression ... To apply a function to each element of a range, use the `map` algorithm: import std.algorithm: map; string[] m = stdin.byLineCopy.map!strip.arr

strip in stdin

2020-12-03 Thread MGW via Digitalmars-d-learn
string[] m = stdin.byLineCopy.array; How to make strip() for each line in an expression ...