Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Word Wrap a Memo Field
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00698752
Message ID:
00698791
Vues:
16
So what you are implying here is that the SET MEMOWIDTH will automatically limit MLINE to returning a word wrapped line that does not exceed 75, but can be less than 75 characters. Is that correct Sergey?

>VFP can parse it for you.
SET MEMOWIDTH TO 75
>lcMemo = < text to format >
>lcNewMemo = ""
>_MLINE  = 0
>FOR i= 1 TO memlines(lcMemo)
>	lcNewMemo = lcNewMemo + MLINE(lcMemo,1,_MLINE) + CHR(13) + CHR(10)
>ENDFOR
>
>REPLACE mymemo WITH lcNewMemo
>* or if you don't want CRLF after the last line
>REPLACE mymemo WITH LEFT(lcNewMemo, LEN(lcNewMemo)-2)
>
>
>>I need some help on a best (quickest) way to break a memo field down. Here is the scenario:
>>
>>I have to read in a set of characters into a memo field.
>>Once they are in the memo field I need to break them every 75 characters with a Carriage Return Line Feed, but I don't want to break them on a word.
>>I want to back down until I get to a space and then put in the carriage return line feed.
>>
>>So does anyone have a code solution that would quickly do this as I am dealing with a large amount of data.
>>
>>TIA
Bret Hobbs

"We'd have been called juvenile delinquents only our neighborhood couldn't afford a sociologist." Bob Hope
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform