On Tue, Mar 17, 2009 at 11:32 AM, Jarrett Billingsley <jarrett.billingsley at gmail.com> wrote: Sigh, I'll get it eventually. template Atoi(string s) { static if(s.length == 1) enum int Atoi = s[$ - 1] - '0'; else enum int Atoi = 10 * Atoi!(s[0 .. $ - 1]) + (s[$ - 1] - '0'); }