Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Getting rid of carriage returns in memo fields
Message
From
20/08/1999 17:03:58
 
 
To
20/08/1999 16:29:14
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00256063
Message ID:
00256076
Views:
33
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
Previous
Reply
Map
View

Click here to load this message in the networking platform