From: Stu Date: 2011-04-22T17:32:28+09:00 Subject: Re: Reversing a string without using array, classes and reverse function On Fri, Apr 22, 2011 at 2:45 AM, Jose Calderon-Celis wrote: > for j in 1..len do >  mycommand += s[-1*j] > > very nice I like the use of your math. By multiplying the array index by negative one your sending the index a reverse number while your for loop traverses forward. This is perfect logic. Here is a rewrite with my while loop: s = "1234567890" r=String.new i = 1 while i <= s.length r << s[i*(-1)] i+=1 end printf s "0987654321" => "0987654321" > y == x.reverse true