Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Removing extra blanks in a memo field
Message
From
05/04/2000 00:17:49
 
 
To
05/04/2000 00:03:13
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00355212
Message ID:
00355503
Views:
35
>>>Before I wrote my code, I test reduce(). It didn`t strip CHR(13), only CHR(10)
>>
>>Like I said, Vbscript.RegExp covers the issue just fine.
>
>How about another, pure VFP solution, in just as many lines of code?
>
>* Converts all carriage returns and line feeds to spaces
>lcString = CHRTRAN(lcString, CHR(13)+CHR(10),SPACE(1))
>* Reduce all strings of spaces to a single space
>DO WHILE SPACE(2)$lcString]
>	lcString = STRTRAN(lcString, SPACE(2), SPACE(1))
>ENDDO
>
More costly - can't put that in except through a UDF - all I do is create an object and use it.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform