I have a string like this:
std::string string1 = \"xjdfhfakdjs%54k34k.-jk34\";
I need to get only \"\"xjdfhfakdjs\", but the string is dyna
std::string the_prefix_you_want = string1.substr(0, string1.find("%"));
See: http://www.cplusplus.com/reference/string/string/find/ and http://www.cplusplus.com/reference/string/string/substr/ for more details