Rikki Cattermole:

int myint = to!int("4" ~ "7" ~ "0" ~ "1");

And to concatenate them there is "join" (joiner is not yet usable here, because to!() doesn't yet accept a lazy input, unfortunately).


Now they are not strings, and the positions of 10^ doesn't change then:

int myint = (1000 * 4) + (100 * 7) + 1;

Even if Phobos doesn't yet have a enumerate() function, you can use a iota+zip+reduce to do this.

Bye,
bearophile

Reply via email to