RosettaCodeData/Task/Reverse-a-string/Harbour/reverse-a-string.harbour
2016-12-05 23:44:36 +01:00

9 lines
143 B
Text

FUNCTION Reverse( sIn )
LOCAL cOut := "", i
FOR i := Len( sIn ) TO 1 STEP -1
cOut += Substr( sIn, i, 1 )
NEXT
RETURN cOut