]> git.tdb.fi Git - libs/core.git/blobdiff - source/utils.h
Revamp the split functions to allow a max_split argument and splitting by longer...
[libs/core.git] / source / utils.h
index 39b330bc9eaed20915de6cc70f8d2fdd52bc0fc5..d0d8a171ba29740ecc406bc5b96f2889c45f5056 100644 (file)
@@ -16,8 +16,13 @@ namespace Msp {
 int strcasecmp(const std::string &, const std::string &);
 std::string tolower(const std::string &);
 std::string toupper(const std::string &);
-std::vector<std::string> split(const std::string &, const std::string & =" \t\r\n", bool =false);
-std::vector<std::string> split(const std::string &, char, bool =false);
+
+std::vector<std::string> split_fields(const std::string &, const std::string &, int =-1);
+std::vector<std::string> split_fields(const std::string &, char, int =-1);
+std::vector<std::string> split_long(const std::string &, const std::string &, int =-1);
+std::vector<std::string> split(const std::string &, const std::string & =" \t\r\n", int =-1);
+std::vector<std::string> split(const std::string &, char, int =-1);
+
 template<typename T>
 std::string join(const T &, const std::string & =" ");
 std::string strip(const std::string &);