Using the std library, and the function find
, how can I know if there are any escaped characters in the given string ?
For instance :
string line = "bla bla bla \n blabla";
bool hasEscapedSequence = (line.find("\n",0) < line.size());
This obviously won't work since the \n
in the find
will be escaped. If I try (line.find("\\n",0) < line.size());
, it doesn't seem to change anything
How should I do ?