I have following string:
"hw_core_detectionhook::Iocard const*"
I have to get only first part, i.e all text present before space, i.e I need the "hw_core_detectionhook::Iocard"
part only.
I have following string:
"hw_core_detectionhook::Iocard const*"
I have to get only first part, i.e all text present before space, i.e I need the "hw_core_detectionhook::Iocard"
part only.
std::stringstream ss;
ss << "hw_core_detectionhook::Iocard const*";
std::string s;
ss >> s;
std::cout << s;
Output:
hw_core_detectionhook::Iocard
See the complete demo online : http://www.ideone.com/w9l1C
s.substr(0,s.find_first_of(" "));