Reverse a string: Difference between revisions

m
→‎{{header|Oberon}}: Fixed language name
(Add Refal)
m (→‎{{header|Oberon}}: Fixed language name)
 
(7 intermediate revisions by 5 users not shown)
Line 748:
 
<syntaxhighlight lang="befunge">55+~>:48>*#8\#4`#:!#<#~_$>:#,_@</syntaxhighlight>
 
=={{header|Binary Lambda Calculus}}==
 
This 9 byte program, featured on https://www.ioccc.org/2012/tromp/hint.html, reverses its input in byte-oriented BLC:
 
<pre>16 46 80 17 3e f0 b7 b0 40</pre>
 
=={{header|BQN}}==
Line 1,709 ⟶ 1,715:
<syntaxhighlight lang="clojure">
!dlrow olleH
</syntaxhighlight>
 
=={{header|Fennel}}==
Uses the same methods (and suffers from the same limitations) as [[#Lua|the Lua example]].
<syntaxhighlight lang="fennel">
(let [example :asdf]
(string.reverse example) ; fdsa
(example:reverse) ; fdsa
nil)
</syntaxhighlight>
 
Line 2,367 ⟶ 2,382:
 
=={{header|langur}}==
ThisThe accountsreverse() forfunction codewill points,reverse buta notstring foraccording to graphemes.
<syntaxhighlight lang="langur">writeln cp2s reverse s2cp q("don't you know)"</syntaxhighlight>
 
{{out}}
Line 3,011 ⟶ 3,026:
60 PRINT REVERSED$</syntaxhighlight>
 
=={{header|Oberon-2}}==
Tested with [https://miasap.se/obnc OBNC].
<syntaxhighlight lang="oberon">MODULE reverse;
Line 4,310 ⟶ 4,325:
. di ustrreverse(s)
νῆγ νὴτ ὶακ νὸναρὐο νὸτ ςὸεθ ὁ νεσηίοπἐ ῇχρἀ νἘ</syntaxhighlight>
 
=={{header|Stringle}}==
This inputs a string from the user and outputs its reverse. The <code>\</code> ''reverse'' operator reverses any string.
 
<syntaxhighlight lang="stringle">$ \$</syntaxhighlight>
 
=={{header|Swift}}==
3,026

edits