Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Best way to strip out trailing blanks/CR/LFs from a stri
Message
From
20/07/2004 17:49:05
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00925773
Message ID:
00926353
Views:
21
Hi Mike,

>Should have known there would be a test. A different approach.

That was not my intention, just compared those different aproaches, tried to understand each one and found it appropriate to let our fellows know what the results were. Just that.

Thanks,

Fernando


>Hi Fernando,
>
>Should have known there would be a test. A different approach.
>
>nStart = 1
>DO WHILE .T.
>	nPos = AT("  ", cString, nStart)	&& double space
>	IF "" = CHRTRAN(RIGHT(cString, LEN(cString) - nPos), ;
>				CHR(13)+CHR(10)+CHR(32), "")
>		cString = LEFT(cString, nPos - 1)
>		EXIT
>	ENDIF
>	IF nPos = 0
>		DO WHILE INLIST(RIGHT(cString, 1), CHR(32), CHR(10), CHR(13))
>			cString = LEFT(cString, LEN(cString) - 1)
>		ENDDO
>		EXIT
>	ENDIF
>	nStart = nStart + 1
>ENDDO
>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform