Logo

Programming-Idioms

History of Idiom 22 > diff from v9 to v10

Edit summary for version 10 by :

Version 9

2015-08-20, 09:51:18

Version 10

2015-08-20, 15:23:26

Idiom #22 Convert string to integer

Extract integer value i from its string representation s (in radix 10)

Idiom #22 Convert string to integer

Extract integer value i from its string representation s (in radix 10)

Imports
import std.conv;
Code
auto i = s.to!int;
Comments bubble
the extremely useful 'to' function can convert just about anything to something else.