Fixed strsplit

Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
This commit is contained in:
Ian Bell
2014-08-04 15:11:33 +02:00
parent ffabfaa144
commit b0098dbae5

View File

@@ -45,7 +45,7 @@ std::vector<std::string> strsplit(std::string s, char del)
// Find the first instance of the delimiter
iR = s.find_first_of(del);
// Delimiter not found, return the same string again
if (iR < 0){
if (iR == std::string::npos){
v.push_back(s);
return v;
}