Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Formatting symbols when copying from memo to character
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00620731
Message ID:
00621251
Views:
12
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), "")
Previous
Reply
Map
View

Click here to load this message in the networking platform