Reading a file of words line by line
    mark 
    mark at qtrac.eu
       
    Thu Jan 16 11:21:33 UTC 2020
    
    
  
On Thursday, 16 January 2020 at 10:10:02 UTC, dwdv wrote:
> On 2020-01-16 04:54, Jesse Phillips via Digitalmars-d-learn 
> wrote:
>> [...]
[...]
> isn't far off, but could also be (sans imports):
>
> return File(filename).byLine
>     .map!(line => line.until!(not!isAlpha))
>     .filter!(word => word.count == wordsize)
>     .map!(word => word.to!string.toUpper)
>     .assocArray(0.repeat);
That's what I'm now using -- thanks!
(Now I can try the next bit.)
    
    
More information about the Digitalmars-d-learn
mailing list