>Whoops - UT removed my spaces... there are 10-20 spaces between the FirstName and the LastName, all in one string.
>
>>Is there any VFP routines that can remove (or replace) multiple space occurances in the middle of a string?
>>
>>I am processing data from another source. The NAME comes across as:
>>
>>FirstName
LastName
>>
>>I'd like to strip out the multiple spaces and leave it with just one space.
Peter --
Try this. I've coded it in several statements for clarity, but these could be combined in one line if needed for performance.c = "Joanna Smith"
c = ALLTRIM (c)
n = ATC (" ", c)
cNew = LEFT (c, n) + ALLTRIM (SUBSTR (c, n + 1))
Enjoy!