On Thursday, 31 March 2016 at 18:25:45 UTC, H. S. Teoh wrote:
On Thu, Mar 31, 2016 at 06:23:21PM +, ParticlePeter via
Digitalmars-d-learn wrote:
Example from docs:
string s = "hello!124:34.5";
string a;
int b;
double c;
formattedRead(s, "%s!%s:%s", , , );
assert(a == "hello" && b == 124 &&
On Thu, Mar 31, 2016 at 06:23:21PM +, ParticlePeter via Digitalmars-d-learn
wrote:
> Example from docs:
> string s = "hello!124:34.5";
> string a;
> int b;
> double c;
> formattedRead(s, "%s!%s:%s", , , );
> assert(a == "hello" && b == 124 && c == 34.5);
>
> now changing the first
Example from docs:
string s = "hello!124:34.5";
string a;
int b;
double c;
formattedRead(s, "%s!%s:%s", , , );
assert(a == "hello" && b == 124 && c == 34.5);
now changing the first formattedRead argument to a string literal:
formattedRead("hello!124:34.5", "%s!%s:%s", , , );
results in this