I have the following string called header: "bla bla hello, just more characters filename="myfile.1.2.doc" more characters"
I need to get the file name and the file type from this string, but my solution seems to be very messy (pseudo code) :
unsigned int end = header.find("filename=");
unsigned int end2 = header.find(" " ", end + sizeof("filename=") + 1) // how to search for ' " ' ?!
std::string fullFileName = header.substr(end +sizeof("filename=") + 1 ,end2 -1);
//now look for the first "." from the end and split by that .
how to look from the end in cpp?
header.find(" \" ", //...);