Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

Removing part of text

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    www.mcselec.com Forum Index -> BASCOM-AVR Unsupported versions
View previous topic :: View next topic  
Author Message
matjazs

Bascom Member



Joined: 08 Nov 2016
Posts: 86

PostPosted: Tue Aug 17, 2021 2:20 pm    Post subject: Removing part of text Reply with quote

Hello.

I receive text from the serial interface:
Code:
@ti0 180,123456789, * John Smith usr:MS


I want to remove the last 7 bytes (characters) of text ( usr:MS).
The last part of the text (*John Smith usr:MS) is variable. This means that this name is sometimes with three parts, sometimes with only one part. It is always separated by a space.
But every time at the end is this text ( usr:MS) that I want to remove.

Which feature (function) would you recommend me to solve this problem?
I tried with delchars, replacechars but this only removes one character.
Left and Right also, but this make me also not appropriate results.

Regards M.

(BASCOM-AVR version : 2.0.8.3 , Latest : 2.0.8.4 )
Back to top
View user's profile
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    www.mcselec.com Forum Index -> BASCOM-AVR Unsupported versions All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum