RosettaCodeData/Task/Reverse-a-string/Harbour/reverse-a-string.harbour

10 lines
143 B
Plaintext

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