Made split() work on char* strings.

This commit is contained in:
Davis King 2013-06-03 21:20:26 -04:00
parent e8276602c1
commit 885a27c070
1 changed files with 8 additions and 0 deletions

View File

@ -920,6 +920,14 @@ namespace dlib
return split(str,delim.c_str()); return split(str,delim.c_str());
} }
inline const std::vector<std::string> split (
const char* str,
const char* delim = " \n\r\t"
)
{
return split(std::string(str),delim);
}
// ---------------------------------------------------------------------------------------- // ----------------------------------------------------------------------------------------
} }