Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Formatting symbols when copying from memo to character
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00620731
Message ID:
00621251
Vues:
17
I'd modify this to read:
lcStr = CHRTRAN(mymemofield, CHR(13) + CHR(10), "  ")
This (IMHO) improves the code by replacing the characters with a space, rather than an empty string, which will keep words from potentially being pushed together. And then, I'd further improve it as follows:
lcStr = CHRTRAN(STRTRAN(mymemofield, CHR(13) + CHR(10), " "), CHR(13) + CHR(10), "  ")
This fixes a shortcoming of my first attempt: often, text files use CHR(13)+CHR(10) as the line separator, rather than just one of the two. My first attempt would replace this sequence with two spaces. This code should replace it with one.

Hope this helps!
zahid

>>When I copy a string of text from a memo file into a character field (to get a listing of first lines for quick reference) line-return symbols appear in the character field and look terrible. How can they be removed?
>
>
lcStr = CHRTRAN(mymemofield, CHR(13) + CHR(10), "")
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform