serial readbytes until

Using readbytesuntil works fine but doesn't transfer the terminator to the buffer. I need to examine the contents of the buffer and often send it on by another serial port but I want it terminated by the same terminator. I can add this to the buffer easily enough but is there some way of the original terminator being transferred to the buffer on read so it is already in the right place to send on. The application reads data from a PC and sends it on to my amateur radio transmitter (TS2000X). Neil, G3RIR

Using readbytesuntil works fine but doesn't transfer the terminator to the buffer. I need to examine the contents of the buffer and often send it on by another serial port but I want it terminated by the same terminator. I can add this to the buffer easily enough but is there some way of the original terminator being transferred to the buffer on read so it is already in the right place to send on. The application reads data from a PC and sends it on to my amateur radio transmitter (TS2000X). Neil, G3RIR

Posting a question is also an Art 8). First describe you TASK, Post your CODE, and then where you STUCK.

Using readbytesuntil works fine but doesn't transfer the terminator to the buffer.

Of course not. That's by design.

I can add this to the buffer easily enough

Then you've figured out what you need to do.

but is there some way of the original terminator being transferred to the buffer on read so it is already in the right place to send on.

Sure. Rewrite the readBytesUntil() method of the Stream class to suit your unique needs.