General information
Category:
Coding, syntax & commands
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only