why there is a [] at the end of assocArray

michaelbi shunjie.bi at gmail.com
Wed Jan 19 14:06:45 UTC 2022


On Wednesday, 19 January 2022 at 13:21:32 UTC, Stanislav Blinov 
wrote:
> On Wednesday, 19 January 2022 at 13:15:35 UTC, michaelbi wrote:
>
>>     	foreach(line; > 
>> File("input.txt").byLine.map!(a=>a.idup).array.transposed)
>
>> so why there is a [] at the end of assocArray printed? thanks.
>
> ...because there's an empty line at the end of input.txt?

i got it, though i still don't know where the [] come from. i 
just add strip here: a=>a.idup.strip


More information about the Digitalmars-d-learn mailing list