Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Removing extra spaces in MIDDLE of str.
Message
From
25/07/2001 22:32:52
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00535205
Message ID:
00535498
Views:
13
>>>So, you would end with MarkGoldin. I'm not sure, this is what you want :)
>>
>>If a string is 'mark goldin' then yes, but isn't that what you want?
>>Mark
>
>Hi Mark,
>
>The original question was how to remove spaces from the middle in the string. Definitely, one last space should be left, otherwise you would have FirstNameLastName without spaces at all. If this string is less than 64K (I hope, it is), reduce function from FoxTools should do its job.
>
>There could be different combinations, say:
>
>
Mark     Anatolievich      Goldin
>
>
Mark     I      Goldin
>
>
Mark    Goldin     Jr.
,
>etc.
>
>you should reduce spaces to just one space.
>
>Actually, I have an application written, where I dealt with lots of different name formats to transform them into our standard. It was quite complicated algorithm...


Oh, I see. But if I keep (and I do) FirstName in one field and LastName in another I will build the result string like this:
abc = ALLTRIM(FirstName) + ' ' + ALLTRIM(LastName)

Mark
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform