RosettaCodeData/Task/Reverse-a-string/AutoIt/reverse-a-string.autoit
Ingy döt Net b83f433714 tasks a-s
2013-04-10 23:57:08 -07:00

12 lines
330 B
Text

#AutoIt Version: 3.2.10.0
$mystring="asdf"
$reverse_string = ""
$string_length = StringLen($mystring)
For $i = 1 to $string_length
$last_n_chrs = StringRight($mystring, $i)
$nth_chr = StringTrimRight($last_n_chrs, $i-1)
$reverse_string= $reverse_string & $nth_chr
Next
MsgBox(0, "Reversed string is:", $reverse_string)