Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

cpp split string by space

std::vector<std::string> string_split(const std::string& str) {
	std::vector<std::string> result;
	std::istringstream iss(str);
	for (std::string s; iss >> s; )
		result.push_back(s);
	return result;
}
Source by www.quora.com #
 
PREVIOUS NEXT
Tagged: #cpp #split #string #space
ADD COMMENT
Topic
Name
9+5 =