Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Return Character - Memo fields
Message
From
16/12/2002 14:12:30
 
 
To
16/12/2002 14:02:18
Jolene Dicks
Human Resources Development Canada
St. John's, Newfoundland, Canada
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00733377
Message ID:
00733385
Views:
17
>How does one identify and remove return characters in a memo field?

We use the following function to remove any unnecessary characters before and after the text:
* Strip the blanks and blank lines at the top and at the bottom
FUNCTION NoCr(tcString)
tcString=ALLTRIM(tcString)
DO WHILE INLIST(LEFT(tcString,1),CHR(13),CHR(10),CHR(160)) AND LEN(tcString)>0
   tcString=SUBSTR(tcString,2)
ENDDO
DO WHILE INLIST(RIGHT(tcString,1),CHR(13),CHR(10),CHR(160)) AND LEN(tcString)>0
   tcString=SUBSTR(tcString,1,LEN(tcString)-1)
ENDDO
RETURN tcString
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Reply
Map
View

Click here to load this message in the networking platform