Skip to content

Commit 82e54e7

Browse files
authored
Add Reverse String in Tcl (#5078)
1 parent 7655f2a commit 82e54e7

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

archive/t/tcl/reverse-string.tcl

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
package require Tcl 8.6
2+
3+
if {$argc != 1} { exit }
4+
5+
set input [lindex $argv 0]
6+
if {$input eq ""} { exit }
7+
8+
puts [join [lreverse [split $input ""]] ""]
9+

0 commit comments

Comments
 (0)