Well I don’t understand the original post here but I think it could be done with the Replace function.
As an aside…
Mechanical typewriters had a left mounted arm that produced two effects.
The first was the ‘light touch’ to advance the paper vertically; go to the next line down the paper.
The second was the ‘heavy touch’ meaning to keep pushing the carriage, with the paper, to the right thereby moving the next print position to the left relative to the paper.
Pushing the lever to the right achieved two effects; a line feed down (light touch) and a carriage return (heavy touch) in that order.
(The modern day ASCII equivalent would be a LineFeed Chr$(10) and then a CarriageReturn Chr$(13) and is probably the reason they have those ASCII numerical values in ascending order. {I don’t know.})
So, a single (heavy touch) to the right, in one motion, produced a New Line to the left margin or to the horizontal position where the lever was released.
There are three reasons for this mechanical behaviour.
The first being that the print mechanism was complex and it was easier to move the carriage…with the paper.
The second reason was that the paper was single sheet.
The third reason was that there was no correcting the line above and so a Line Feed was always down the sheet.
(In other words, if you made a mistake on the line above…change the sheet.)
(Correcting typewriters came along much later.)
So far so good for old mechanical typewriters.
Then along came the electrical typewriters (printers) and that made a difference.
The print mechanism became less complex and lighter, well not always.
It became easier to move the print head rather than the carriage which carried the paper with it.
The paper became continuous sheet for computer use, scan fold paper.
Moving continuous sheet both into and out of the typewriters (printers) became the headache.
Computers need precise vertical paper positioning.
Tractor feed was the answer.
Tractor feed margins need to be removed after printing.
Tractor feeds are a weak attachment to the paper for removal.
The paper needs to travel vertically, without horizontal force, because of that weakness.
Back to square one.
The printer must move the print head rather than the paper on continuous sheet feed.
It’s required to be fast and paper jams would be horrendous it not so.
(Bad enough as it is without moving the paper.)
The mechanical ASCII sequence of LineFeed Chr$(10) and then a CarriageReturn Chr$(13) is replaced by CarriageReturn Chr$(13) and then LineFeed Chr$(10).
(It’s faster to issue the LineFeed Chr$(10) after the CarriageReturn Chr$(13) because the LineFeed can be done during the CarriageReturn.)
The need for speed.
Then along came the Line Printer.
Neither the carriage, there is none, nor the paper move horizontally.
The characters are on a continuously rotating drum.
The print head is replaced by (usually) 132 lightweight hammers.
(This can move slightly horizontally but (again usually) only by one character spacing on the character print drum.)
Ink ribbon moves horizontally from supply spool to take-up spool.
They print quickly; they make a lot of noise.
CarriageReturn/LineFeed pairs started off being LineFeed/CarriageReturn pairs but were reversed for speed.
Hmmm: -
Try the Replace() function…