Good name for f.byLine.map!(x => x.idup)?
Chris via Digitalmars-d
digitalmars-d at puremagic.com
Wed May 21 06:37:32 PDT 2014
On Thursday, 20 March 2014 at 01:38:38 UTC, Andrei Alexandrescu
wrote:
> On 3/19/14, 4:53 PM, Meta wrote:
>> On Wednesday, 19 March 2014 at 22:30:55 UTC, Peter Alexander
>> wrote:
>>> On Sunday, 16 March 2014 at 16:58:36 UTC, Andrei Alexandrescu
>>> wrote:
>>>> A classic idiom for reading lines and keeping them is
>>>> f.byLine.map!(x
>>>> => x.idup) to get strings instead of the buffer etc.
>>>
>>> f.readLines
>>
>> What about a simpler f.iter() or f.lineIter()?
>
> Ideally it would be a variation of byLine. -- Andrei
byLineAsString
In my own APIs I usually use "AsString" in the signature to make
it clear what you'll get, if an entity can take many forms (an
array of strings, user defined types). In other cases toString().
byLineToString
?
More information about the Digitalmars-d
mailing list