Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Getting rid of carriage returns in memo fields
Message
De
23/08/1999 15:12:36
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
22/08/1999 18:38:06
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00256063
Message ID:
00256740
Vues:
35
>Thanks Dragan,
>
>I'll hold on to this one. However since it doesn't remove leading spaces I guess we'll have to keep what we have. We've had some enter almost a whole line of leading spaces which messes with our report writing program.
>
>>n=alines(laRows, this.value)lcOutValue=""
>lOK2Copy=.f. && this will be .t. when we've found first non-empty line
>for i=1 to n if lOK2Copy
> lcOutValue=lcOutValue+chr(13)+laRows[i] && just copy it as a new line
> else
> lOK2Copy=!empt(LTrim(laRows[i])) && .t. when we find the first not empty line
> if lOk2Copy
> lcOutValue=LTrim(laRows[i]) && start with this line, left trimmed
> endif endifendforthis.value=lcOutValue

Well, you could LTrim() all lines - I've written this to do it with leading lines only, because that's wha I understood you need. You may modify it as you like until you get what you need.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform