formattedRead can't work with tab delimiter input

kdevel kdevel at vogtner.de
Tue Sep 19 20:04:36 UTC 2017


On Tuesday, 19 September 2017 at 13:28:22 UTC, Ky-Anh Huynh wrote:
> Hi,
>
> I want to read two fields from STDIN
>
>     string key;
>     double value;
>     line_st.formattedRead!"%s %f"(key, value);

Well it's so different from C. I would use this:

---
auto t = line_st.split.join (' ');
t.formattedRead!"%s %f"(key, value);
---



More information about the Digitalmars-d-learn mailing list