Programming-Idioms

History of Idiom 156

Idiom #156 Format integer with zero-padding

Assign to string s the value of integer i in 3 decimal digits. Pad with zeros if i < 100. Keep all digits if i1000.

#Edit dateEdit SummaryAuthor
👁 Δ 22 2020-05-30, 00:33 [JS] Smaller indent programming-idioms.org
👁 Δ 21 2020-05-30, 00:33 New JS implementation by user [programming-idioms.org] programming-idioms.org
👁 Δ 20 2020-05-03, 20:32 [Clojure] Result s programming-idioms.org
👁 Δ 19 2020-05-03, 20:30 [Clojure] Variable name i programming-idioms.org
👁 Δ 18 2020-04-29, 11:08 New Clojure implementation by user [misha] misha
👁 Δ 17 2019-11-02, 22:30 Linked to idiom #215 [Pad string on the left] programming-idioms.org
👁 Δ 16 2019-11-02, 22:02 Linked to idiom #214 [Pad string on the right] programming-idioms.org
👁 Δ 15 2019-10-07, 23:23 New Csharp implementation by user [bigwavedave] bigwavedave
👁 Δ 14 2019-09-28, 22:44 New Fortran implementation by user [tkoenig] tkoenig
👁 Δ 13 2019-09-28, 09:13 New Perl implementation by user [daxim] daxim
👁 Δ 12 2019-09-26, 18:07 [Java] forgot assignment bert
👁 Δ 11 2019-09-26, 18:06 New Java implementation by user [bert] bert
👁 Δ 10 2018-09-04, 12:42 New PHP implementation by user [ricardo_sdl] ricardo_sdl
👁 Δ 9 2017-10-28, 10:59 New Python implementation by user [Oldboy] Oldboy
👁 Δ 8 2017-07-26, 00:20 [D] sdfsdf Bzzzz
👁 Δ 7 2017-07-26, 00:19 New D implementation by user [Bzzzz] Bzzzz
👁 Δ 6 2017-04-29, 06:54 [Rust] Fixed demo link TheVTM
👁 Δ 5 2017-04-27, 10:38 New Rust implementation by user [TheVTM] TheVTM
👁 Δ 4 2017-03-26, 16:40 New Ruby implementation by user [steenslag] steenslag
👁 Δ 3 2017-03-19, 20:53 [Go] Integer variable is i, per idiom statement programming-idioms.org
👁 Δ 2 2017-03-18, 16:32 New Pascal implementation by user [Bart] Bart
1 2017-03-16, 13:10 Idiom creation by user [programming-idioms.org] programming-idioms.org