In VFP7
lcStr = "Chief Probation Officer"
lcResult = ""
FOR i=1 TO GetWordCount(lcStr)
lcResult = lcResult + LEFT(GETWORDNUM(lcStr, i),1)
ENDFOR
? lcResult
There're similar functions in Foxtools in previous versions.
>I am trying to pick out first character in a string for example:
>
>Chief Probation Officer
>
>I need to return
>
>CPO
>
>
>I there a quick way of doing this, I will need to perform this operation on hundreds of strings. If there is no straight forward way of doing this then do I put each character in an array and search the array ?
>
>Thanks
>Nick Patel
--sb--