Hi VFPers,
Thought I will create a new message. And seeing it was discussed in another thread, I thought it might be a good idea to do something similar using some of the features of .NET
Lets look at the basics of reversing a string: "12345" -> "54321", the recursive way. Yes you heard correctly Recursive
FUNCTION Reverse(cStr AS STRING) AS STRING
RETURN iif(cStr.Length < 2, cStr, Reverse(cStr.Substring(1)) + cStr.Left(1))
RETURN iif(Len(cStr) < 2, cStr, Reverse(SubStr(cStr, 2)) + Left(cStr, 1))
ENDFUNC
Voila 1 line of code to reverse a string
Hope this is still of interest to some.