On Nov 10, 2006, at 12:05 PM, [EMAIL PROTECTED] wrote:

Hey all

Trying to achieve something relatively trivial here in RB 5.5. All I want to do is pull out the EndOfLine characters from a file. The below works fine for short files, but when I throw a 200Kbyte file at it, the result is no changes made. Any suggestions as to where I'm going wrong, a 64k limit
somewhere?

Doubtful as I've got apps that sometimes have strings that are significantly longer than that (several Mb in size in some cases)

 dim f as folderitem
 dim s as binarystream
 dim a as string
 f=getopenfolderItem("????")
 s=f.openasbinaryFile(True)
 a=s.read(s.length)
 a=replaceall(a,endofline,"")
 s.length=0
 s.position=0
 s.flush
 s.write a
 s.close

Not sure why this would give you grief.
What kind of line endings are in the file ?
CR + LF ? LF ? CR ?
This code only replaces one kind and not the others

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to