in reply to Re: delete last CR and LF from txt
in thread delete last CR and LF from txt
Even if you dont know its there you can seek to the last 2 bytes and read them and compare them to CR/LF. If they are indeed a CR/LF then truncate, else leave it alone. Its not quite a one-liner but still tiny.