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

Idiom #137 Check if string contains only digits

Set boolean b to true if string s contains only characters in range '0'..'9', false otherwise.

#Edit dateEdit SummaryEditor
👁 Δ 25 2018-12-30, 11:46 Consistent emphasis true, false programming-idioms.org
👁 Δ 24 2018-12-17, 18:47 [Rust] Map is_numeric directly freecoder
👁 Δ 23 2018-08-29, 14:51 New PHP implementation by user [ricardo_sdl] ricardo_sdl
👁 Δ 22 2018-08-18, 21:34 New Perl implementation by user [dmaestro] dmaestro
👁 Δ 21 2018-06-06, 02:38 New Rust implementation by user [davelpz] davelpz
👁 Δ 20 2017-12-06, 13:56 [Rust] Docs Alfriadox
👁 Δ 19 2017-12-06, 13:55 [Rust] Removed example value. Alfriadox
👁 Δ 18 2017-12-06, 13:54 New Rust implementation by user [Alfriadox] Alfriadox
👁 Δ 17 2017-09-12, 15:06 New Haskell implementation by user [Algorhythmus] Algorhythmus
👁 Δ 16 2016-11-13, 14:31 [Ruby] +DemoURL programming-idioms.org
👁 Δ 15 2016-11-06, 21:16 New Lua implementation by user [Nepta] Nepta
👁 Δ 14 2016-09-14, 20:42 [Python] No need to give sample value programming-idioms.org
👁 Δ 13 2016-09-14, 08:32 New Python implementation by user [cons0l3] cons0l3
👁 Δ 12 2016-09-09, 21:36 New Ruby implementation by user [steenslag] steenslag
👁 Δ 11 2016-08-13, 22:02 New D implementation by user [BBaz] BBaz
👁 Δ 10 2016-08-13, 21:11 [D] sdgfdfgdsg BBaz
👁 Δ 9 2016-08-13, 21:11 New D implementation by user [BBaz] BBaz
👁 Δ 8 2016-06-25, 22:38 New Pascal implementation by user [Bart] Bart
👁 Δ 7 2016-06-10, 22:05 New JS implementation by user [programming-idioms.org] programming-idioms.org
👁 Δ 6 2016-06-10, 21:55 New Go implementation by user [programming-idioms.org] programming-idioms.org
👁 Δ 5 2016-06-10, 21:46 [Java] Kerning programming-idioms.org
👁 Δ 4 2016-06-10, 21:46 New Go implementation by user [programming-idioms.org] programming-idioms.org
👁 Δ 3 2016-06-10, 21:27 Less ugliness programming-idioms.org
👁 Δ 2 2016-06-10, 21:27 Characters usually quoted programming-idioms.org
1 2016-06-10, 21:26 Idiom creation by user [programming-idioms.org] programming-idioms.org