www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Use std.string.lineSplitter with std.array.Appender!string

reply NonNull <non-null use.startmail.com> writes:
Disambiguate how ?

```
     import std.string, std.array;
     auto s = appender!string;
     // .......
     auto a = s.lineSplitter;
```

Error: template std.string.lineSplitter cannot deduce function 
from argument types !()(Appender!string), candidates are:

std.string.lineSplitter(Flag keepTerm = No.keepTerminator, 
Range)(Range r) if (hasSlicing!Range && hasLength!Range && 
isSomeChar!(ElementType!Range) && !isSomeString!Range)

std.string.lineSplitter(Flag keepTerm = No.keepTerminator, C)(C[] 
r) if (isSomeChar!C)
Aug 28 2019
parent reply Anonymouse <zorael gmail.com> writes:
On Wednesday, 28 August 2019 at 15:52:18 UTC, NonNull wrote:
 Disambiguate how ?

 ```
     import std.string, std.array;
     auto s = appender!string;
     // .......
     auto a = s.lineSplitter;
 ```
auto a = s.data.lineSplitter; On mobile, can't test.
Aug 28 2019
parent NonNull <non-null use.startmail.com> writes:
On Wednesday, 28 August 2019 at 15:56:55 UTC, Anonymouse wrote:
 On Wednesday, 28 August 2019 at 15:52:18 UTC, NonNull wrote:
 Disambiguate how ?

 ```
     import std.string, std.array;
     auto s = appender!string;
     // .......
     auto a = s.lineSplitter;
 ```
auto a = s.data.lineSplitter; On mobile, can't test.
Yes!
Aug 28 2019