RosettaCodeData/Task/Reverse-a-string/Harbour/reverse-a-string.harbour
2023-07-01 13:44:08 -04: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