vendredi 3 août 2018

How can i find substring of concatenation ASCII and std::string?

I have a string like ][RS01GSXXXXX.

I need to match first 8 characters and then fetch the "XXXXX" part.

Here, RS and GS is one character whose ascii values are 30 and 29 respectively.

How can i achieve that in c++?

I have seen something like this in pascal for matching,

LeftStr(str, 8) = '][' + #30 + '01' + #29 

Can i do aything like this in c++?

Thanks in advance.

Aucun commentaire:

Enregistrer un commentaire