Add split string function #4933

This commit is contained in:
Jerry (Xinyu Hou)
2015-10-29 12:52:55 -07:00
parent 27f83e1801
commit 72397137c0
2 changed files with 27 additions and 0 deletions

View File

@@ -22,6 +22,7 @@
#include "common/stdstring.h"
#include <stdarg.h>
#include <vector>
// use standard C++ string class for our string class
typedef std::string String;
@@ -100,6 +101,12 @@ Convert an a \c string to an size type
*/
size_t stringToSizeType(String string);
//! Split a string into substrings
/*!
Split a \c string that separated by a \c c into substrings
*/
std::vector<String> splitString(String string, const char c);
//! Case-insensitive comparisons
/*!
This class provides case-insensitve comparison functions.