Importing/exporting data with carriage returns (I Think)
Brian K. White
brian at aljex.com
Tue Aug 29 10:17:19 PDT 2017
On 8/29/2017 12:29 PM, Robert Helbing via Filepro-list wrote:
> I also came across the problem of purging linefeeds and carriage returns
> from incoming data. I found it frustrating that neither "instr()" nor
> "xlate()" could find or replace the pesky intruders.
Both instr and xlate handle lf and cr just fine.
x = "\"line 1 lf" & chr("10") & "line 2 cr" & chr("13") & "\""
msgbox x
lf = instr(x,chr("10")) ; cr = instr(x,chr("13"))
msgbox "lf="{lf<"cr="{cr
msgbox xlate(x,chr("10")&chr("13"),"")
┌──────────────────┐
│ "line 1 lf │
│ line 2 cr?" │
└── Press Enter ┘
┌──────────────────┐
│ lf=11 cr=21 │
└── Press Enter ┘
┌──────────────────────┐
│ "line 1 lfline 2 cr" │
└────── Press Enter ┘
--
bkw
More information about the Filepro-list
mailing list