December 04, 2020 strip in stdin | ||||
---|---|---|---|---|
| ||||
string[] m = stdin.byLineCopy.array; How to make strip() for each line in an expression ... |
December 04, 2020 Re: strip in stdin | ||||
---|---|---|---|---|
| ||||
Posted in reply to MGW | 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.array; |
Copyright © 1999-2021 by the D Language Foundation