Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Getting rid of carriage returns in memo fields
Message
De
20/08/1999 17:03:58
 
 
À
20/08/1999 16:29:14
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00256063
Message ID:
00256076
Vues:
31
Hi Brian,

Didn't say where you wanted to remove the carriage returns from. Here is some code to remove leading carriage returns. Perhaps you can tweak if you need anything else.

Parameters lcTrimmed
DO WHILE .T.
DO CASE
CASE LEFT(lcTrimmed,1) = CHR(13) && Enter Key
lcTrimmed = SUBSTR(lcTrimmed,2)
CASE LEFT(lcTrimmed,1) = CHR(10) && CTRL ENTER Key
lcTrimmed = SUBSTR(lcTrimmed,2)
CASE LEFT(lcTrimmed,1) = " " && Trim Spaces
lcTrimmed = LTRIM(lcTrimmed)
OTHERWISE
EXIT
ENDCASE
ENDDO

RETURN lcTrimmed

HTH
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform