Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
TRIM() that gets newline characters
Message
 
À
31/03/1999 10:35:20
Tim Hockin
Illinois State U - Residential Computing
Normal, Illinois, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00203851
Message ID:
00203904
Vues:
14
Tim,

Try something like this (it is not heavily tested so you may need to do some debugging);
LPARAMETERS pcString
pcString = TRIM(pcString)
LOCAL lnCnt, lcChar
FOR lnCnt = LEN(pcstring)-1 to 0 STEP -1
	lcChar = SUBSTR(pcString,lnCnt,1)
	IF lcChar = CHR(13) OR ;
           lcChar = CHR(10) or ;
           lcChar = " " or ;
           lcChar = CHR(9)
		pcString = LEFT(pcString,LEN(pcString)-1)
	ELSE
		EXIT
	ENDIF
ENDFOR
RETURN pcString
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform