This language bar is your friend. Select your favorite languages!

Idiom #22 Convert string to integer

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

Illustration
#Edit dateEdit SummaryEditor
👁 Δ 80 2019-10-23, 11:02 New Csharp implementation by user [S. K.] S. K.
👁 Δ 79 2019-10-14, 12:23 [Elixir] Dead link: play.elixirbyexample.com has been down for a while programming-idioms.org
👁 Δ 78 2019-10-08, 12:01 [C] K&R recommend spaces around operators phrank
👁 Δ 77 2019-10-08, 08:17 New JS implementation by user [burimshala] burimshala
👁 Δ 76 2019-09-29, 17:47 [Perl] more verbose daxim
👁 Δ 75 2019-09-27, 23:21 New VB implementation by user [EvilGenius] EvilGenius
👁 Δ 74 2019-09-26, 22:06 New Cpp implementation by user [Blooser] Blooser
👁 Δ 73 2019-09-26, 21:29 New JS implementation by user [gumbo59] gumbo59
👁 Δ 72 2019-09-26, 17:54 New Kotlin implementation by user [miguel] miguel
👁 Δ 71 2019-09-26, 17:53 New Kotlin implementation by user [jay] jay
👁 Δ 70 2019-09-26, 16:57 New Fortran implementation by user [tkoenig] tkoenig
👁 Δ 69 2019-09-26, 16:03 New Lisp implementation by user [foobar] foobar
👁 Δ 68 2019-07-05, 18:02 New Rust implementation by user [tormenta77] tormenta77
👁 Δ 67 2019-03-03, 16:05 Restored version 65 programming-idioms.org
👁 Δ 66 2019-02-25, 17:30 [Cpp] dsd sd
👁 Δ 65 2017-12-27, 11:55 New Cpp implementation by user [Jeff] Jeff
👁 Δ 64 2017-06-06, 15:19 New Scheme implementation by user [Dodopod] Dodopod
👁 Δ 63 2017-04-05, 10:44 New JS implementation by user [otonashinotachi] otonashinotachi
👁 Δ 62 2017-02-02, 21:01 Admin deletes impl 356 programming-idioms.org
👁 Δ 61 2016-11-30, 20:49 [Elixir] DemoURL programming-idioms.org
👁 Δ 60 2016-11-27, 14:55 +keyword programming-idioms.org
👁 Δ 59 2016-11-27, 14:50 [Scala] Closer to idiom statement, I guess programming-idioms.org
👁 Δ 58 2016-11-27, 14:47 [Pascal] Less code programming-idioms.org
👁 Δ 57 2016-11-27, 14:44 [Java] Less whitespace programming-idioms.org
👁 Δ 56 2016-11-27, 14:43 [Java] Less whitespace programming-idioms.org
👁 Δ 55 2016-11-27, 14:41 [Haskell] Less whitespace programming-idioms.org
👁 Δ 54 2016-11-13, 22:40 [Go] +DemoURL programming-idioms.org
👁 Δ 53 2016-11-13, 22:37 [Go] Var names s and i in demo programming-idioms.org
👁 Δ 52 2016-11-13, 22:34 [Ruby] +DemoURL programming-idioms.org
👁 Δ 51 2016-11-11, 16:17 +keywords programming-idioms.org
👁 Δ 50 2016-11-07, 16:06 Updated picture URL by user [programming-idioms.org] programming-idioms.org
👁 Δ 49 2016-10-20, 11:49 Updated picture URL by user [programming-idioms.org] programming-idioms.org
👁 Δ 48 2016-10-20, 11:43 [Perl] Fixed comment syntax programming-idioms.org
👁 Δ 47 2016-10-20, 11:42 [Perl] Removed sample values programming-idioms.org
👁 Δ 46 2016-09-07, 21:10 Linked to idiom #146 [Convert string to floating point number] programming-idioms.org
👁 Δ 45 2016-08-18, 22:43 keywords programming-idioms.org
👁 Δ 44 2016-07-13, 23:15 keywords programming-idioms.org
👁 Δ 43 2016-07-13, 23:15 keywords programming-idioms.org
👁 Δ 42 2016-05-20, 10:27 keywords programming-idioms.org
👁 Δ 41 2016-02-18, 16:57 New Scala implementation by user [meshelton]
👁 Δ 40 2016-02-16, 21:28 New Scala implementation by user [meshelton]
👁 Δ 39 2016-02-16, 16:56 [Cpp] cstdlib C++ standard header file is preferred
👁 Δ 38 2016-02-16, 16:44 [Ada] Result variable should be named 'I'
👁 Δ 37 2016-02-16, 15:32 New Ada implementation by user [Smaehtin]
👁 Δ 36 2016-02-16, 15:13 New Lua implementation by user [jparoz]
👁 Δ 35 2016-01-08, 13:52 [Rust] Comment conciseness.
👁 Δ 34 2016-01-08, 13:51 [Rust] Comment conciseness
👁 Δ 33 2015-12-30, 21:34 [Ruby] +DocURL
👁 Δ 32 2015-12-30, 21:31 [Java] +DocURL
👁 Δ 31 2015-12-30, 21:28 [Pascal] uses SysUtils; -> I guess this is an import
👁 Δ 30 2015-12-30, 21:27 [Pascal] Comment emphasize
👁 Δ 29 2015-12-30, 21:26 [D] Comment emphasize
👁 Δ 28 2015-12-30, 21:25 [JS] Comment line break
👁 Δ 27 2015-12-30, 21:24 [Perl] Comments: out of code block
👁 Δ 26 2015-12-30, 21:21 [Rust] Comment emphasize
👁 Δ 25 2015-12-30, 21:19 [Rust] Severed 2 syntaxes -> 2 impls
👁 Δ 24 2015-12-30, 21:19 New Rust implementation by user [programming-idioms.org]
👁 Δ 23 2015-11-30, 12:37
👁 Δ 22 2015-10-29, 14:05
👁 Δ 21 2015-10-25, 19:06
👁 Δ 20 2015-09-04, 11:42
👁 Δ 19 2015-09-03, 13:21
👁 Δ 18 2015-09-03, 12:44
👁 Δ 17 2015-08-21, 23:11
👁 Δ 16 2015-08-21, 23:10
👁 Δ 15 2015-08-21, 23:10
👁 Δ 14 2015-08-21, 06:25
👁 Δ 13 2015-08-20, 16:22
👁 Δ 12 2015-08-20, 16:21
👁 Δ 11 2015-08-20, 16:08
👁 Δ 10 2015-08-20, 15:23
👁 Δ 9 2015-08-20, 09:51
👁 Δ 8 2015-08-19, 14:44
👁 Δ 7 2015-08-18, 14:57
👁 Δ 6 2015-08-03, 22:57
👁 Δ 5 2015-08-01, 16:39
👁 Δ 4 2015-08-01, 16:38
👁 Δ 3 2015-07-31, 19:00
👁 Δ 2 2015-05-06, 21:04
1 2015-04-08, 09:23