Heya
I got a long string from a HTML request. I need to find the following substring within:
<&randomtag>
However when I'm trying to search it gives me wrong results.
If I replace the string with something, not containing "<" ">" it works flawlessly.
Relevant code:
(not copied, might have some typos, but works without special characters)
std::string readBuffer;
std::string starttag;
std::string endtag;
size_t sstart;
size_t send;
sstart=readBuffer.find(starttag);
send=redBuffer.find(endtag);
correction=readBuffer.substr(sstart,send-sstart);
std::cout << correction << std::endl;
So yeah, if anyone happens to know a way to fix this, I'd very much be greatful :)
Thanks in advance