Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Best way to strip out trailing blanks/CR/LFs from a stri
Message
De
20/07/2004 17:49:05
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00925773
Message ID:
00926353
Vues:
20
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
>
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform