07-08-2022, 05:36 PM
(07-08-2022, 05:08 PM)SquirrelMonkey Wrote: I tried that. When I type "Print #f2%, line$;" it still adds a character.
That's odd, then I'd say that character is already part of line$ and not added by the PRINT, but as far as I see you use LINE INPUT, which usually skips CRLF.
However, try this:
Code: (Select All)
OPEN "B", #1, "YourOriginalFile"
orgDat$ = SPACE$(LOF(1))
GET #1, , orgDat$
CLOSE #1
newDat$ = StrReplace$(orgDat$, "oldString", "newString")
OPEN "B", #1, "YourNewFile"
PUT #1, , newDat$
CLOSE #1
'include QB64's string tools
'$INCLUDE: 'source\utilities\string.bas'
GuiTools, Blankers & other Projects:
https://staging.qb64phoenix.com/forumdisplay.php?fid=32
Libraries & useful Functions:
https://staging.qb64phoenix.com/forumdisplay.php?fid=23
https://staging.qb64phoenix.com/forumdisplay.php?fid=32
Libraries & useful Functions:
https://staging.qb64phoenix.com/forumdisplay.php?fid=23