Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

c++ split string by several space

std::string s = "split on    whitespace   "; 
std::vector<std::string> result; 
std::istringstream iss(s); 
for(std::string s; iss >> s; ) 
    result.push_back(s); 
 
PREVIOUS NEXT
Tagged: #split #string #space
ADD COMMENT
Topic
Name
3+1 =