From 885a27c070d4f81e834522dc4c537ec30bda99ca Mon Sep 17 00:00:00 2001 From: Davis King Date: Mon, 3 Jun 2013 21:20:26 -0400 Subject: [PATCH] Made split() work on char* strings. --- dlib/string/string.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/dlib/string/string.h b/dlib/string/string.h index 7adfadf49..f782111a9 100644 --- a/dlib/string/string.h +++ b/dlib/string/string.h @@ -920,6 +920,14 @@ namespace dlib return split(str,delim.c_str()); } + inline const std::vector split ( + const char* str, + const char* delim = " \n\r\t" + ) + { + return split(std::string(str),delim); + } + // ---------------------------------------------------------------------------------------- }