could be a situation to use STR ArraVar\XCharacter\EndedByXYZ

using STR ArrayVar\7\13

if you send ABC\13 it will consider only the ABC

If you Send ABC123\13 it will consider all character.

Now read ArrayVar[3] to know wich string combination you received.

Now if there's a way hidden way to know how much character you received by one of the internal ressource of PBP (macro or PBP variable)it can add some flexibility. Maybe Darrel or somebody else may dig in it.