Programming-Idioms

History of Idiom 41

Idiom #41 Reverse a string

Create string t containing the same characters as string s, in reverse order.
Original string s must remain unaltered. Each character must be handled correctly regardless its number of bytes in memory.

Illustration
#Edit dateEdit SummaryEditor
👁 Δ 67 2019-12-08, 21:35 [Rust] +demo programming-idioms.org
👁 Δ 66 2019-12-08, 21:33 [Rust] 2 ways => 2 impl programming-idioms.org
👁 Δ 65 2019-12-08, 21:32 New Rust implementation by user [programming-idioms.org] programming-idioms.org
👁 Δ 64 2019-12-06, 02:09 [Rust] Added an explaination of the turbofish and an alternate version that doesn't use it GlitchyCat
👁 Δ 63 2019-11-16, 18:55 Restored version 61 programming-idioms.org
👁 Δ 62 2019-11-16, 13:09 [C] а ва
👁 Δ 61 2019-10-14, 12:24 [Elixir] Dead link: play.elixirbyexample.com has been down for a while programming-idioms.org
👁 Δ 60 2019-09-30, 11:39 New VB implementation by user [Jak Drako] Jak Drako
👁 Δ 59 2019-09-29, 19:11 [Fortran] Variable names have been changed to t and s (rather than string_t and string_s) to match the specification spectrum
👁 Δ 58 2019-09-29, 18:43 [Perl] complete overhaul daxim
👁 Δ 57 2019-09-27, 20:51 [Cobol] fix Roie8
👁 Δ 56 2019-09-27, 20:41 New Cobol implementation by user [Roie8] Roie8
👁 Δ 55 2019-09-27, 08:49 New Fortran implementation by user [tkoenig] tkoenig
👁 Δ 54 2019-09-27, 08:28 [Perl] Wrong impl programming-idioms.org
👁 Δ 53 2019-09-27, 08:24 [Kotlin] Variable names s and t programming-idioms.org
👁 Δ 52 2019-09-26, 18:44 New Clojure implementation by user [jamesleonis] jamesleonis
👁 Δ 51 2019-09-26, 18:43 New Kotlin implementation by user [fojji] fojji
👁 Δ 50 2019-09-26, 17:29 New C implementation by user [daniel] daniel
👁 Δ 49 2019-09-26, 15:47 [Cpp] clean up variable names alok99
👁 Δ 48 2019-09-26, 15:47 New Cpp implementation by user [alok99] alok99
👁 Δ 47 2019-09-26, 15:20 New Lisp implementation by user [foobar] foobar
👁 Δ 46 2019-09-26, 13:57 New Python implementation by user [Rochelimit] Rochelimit
👁 Δ 45 2018-03-07, 03:20 New Perl implementation by user [wobray] wobray
👁 Δ 44 2018-01-25, 09:10 New Pascal implementation by user [holicron] holicron
👁 Δ 43 2018-01-17, 15:42 [Dart] username corrected Edward E.
👁 Δ 42 2018-01-17, 15:41 New Dart implementation by user [Ed] Ed
👁 Δ 41 2018-01-04, 00:00 [Scala] Var name s programming-idioms.org
👁 Δ 40 2018-01-03, 23:59 [Rust] No sample value inside the snippet programming-idioms.org
👁 Δ 39 2018-01-03, 23:44 [Python] Was wrong (didn't handle multi-byte) programming-idioms.org
👁 Δ 38 2018-01-03, 23:34 Admin deletes impl 303 programming-idioms.org
👁 Δ 37 2018-01-03, 23:27 [PHP] No sample value inside the snippet programming-idioms.org
👁 Δ 36 2018-01-03, 23:26 [Lua] Var name t programming-idioms.org
👁 Δ 35 2018-01-03, 23:24 [JS] Inverted t, s programming-idioms.org
👁 Δ 34 2018-01-03, 23:23 [D] Var name s programming-idioms.org
👁 Δ 33 2017-11-19, 03:53 Admin deletes impl 471 programming-idioms.org
👁 Δ 32 2017-11-19, 03:06 [C] last version included stdlib but didnt actually use it. 20Megajules
👁 Δ 31 2017-11-18, 23:13 Admin deletes impl 2175 programming-idioms.org
👁 Δ 30 2017-11-05, 19:13 New Clojure implementation by user [furoscame] furoscame
👁 Δ 29 2016-12-13, 20:53 [Rust] because it works without the external crate sphinxc0re
👁 Δ 28 2016-11-13, 15:02 [Ruby] +DemoURL programming-idioms.org
👁 Δ 27 2016-09-27, 15:57 Updated picture URL by user [programming-idioms.org] programming-idioms.org
👁 Δ 26 2016-04-07, 09:20 New Lua implementation by user [Nepta]
👁 Δ 25 2016-02-18, 16:57 [Scala] Incorrect
👁 Δ 24 2016-02-16, 21:59 [Scala] Incorrect
👁 Δ 23 2016-02-16, 21:59 New Scala implementation by user [meshelton]
👁 Δ 22 2016-02-16, 18:45 New Csharp implementation by user [bdadams]
👁 Δ 21 2015-12-29, 23:23 [PHP]Comment style
👁 Δ 20 2015-12-18, 03:06 New Erlang implementation by user [elbrujohalcon]
👁 Δ 19 2015-11-30, 12:37
👁 Δ 18 2015-10-29, 14:05
👁 Δ 17 2015-09-05, 19:10
👁 Δ 16 2015-09-04, 12:07
👁 Δ 15 2015-09-03, 15:23
👁 Δ 14 2015-08-22, 20:45
👁 Δ 13 2015-08-21, 23:18
👁 Δ 12 2015-08-20, 18:55
👁 Δ 11 2015-08-20, 17:17
👁 Δ 10 2015-08-20, 16:37
👁 Δ 9 2015-08-20, 16:35
👁 Δ 8 2015-08-20, 16:35
👁 Δ 7 2015-08-20, 15:47
👁 Δ 6 2015-08-20, 10:04
👁 Δ 5 2015-08-20, 06:19
👁 Δ 4 2015-08-18, 14:54
👁 Δ 3 2015-08-01, 16:59
👁 Δ 2 2015-07-31, 19:20
1 2015-05-06, 21:04