Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Removing extra spaces in MIDDLE of str.
Message
From
26/07/2001 17:18:14
 
 
To
25/07/2001 13:47:03
Peter Brama
West Pointe Enterprises
Detroit, Michigan, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00535205
Message ID:
00536041
Views:
9
We use this:

*-----
function onespace
*
* Leaves only one space between the words of a string, and optionnaly trims the string
*
lparameters lcString, lnLen

lcString = alltrim(lcString)
do while ' ' $ lcString
lcString = strtran(lcString, ' ', ' ')
enddo

* Trims the string if necessary
if type('lnLen') = 'N' and lnLen > 0
lcString = padr(lcString, lnLen)
endif

return lcString
*-----
Gensoft Sàrl
Christian Carron
Previous
Reply
Map
View

Click here to load this message in the networking platform