X-Git-Url: http://git.tdb.fi/?p=libs%2Fcore.git;a=blobdiff_plain;f=source%2Futils.cpp;fp=source%2Futils.cpp;h=5a6bccdaca381e9e4cd066e2c0962489c4c457d1;hp=675a2b1094b44f05d44b8cdb3e25cd732b2f72a0;hb=36f9e78ae75f5e14b132f37d249340ad3480b8ce;hpb=53a9d24ac42a042eedcacf00e906a989b6773bb0 diff --git a/source/utils.cpp b/source/utils.cpp index 675a2b1..5a6bccd 100644 --- a/source/utils.cpp +++ b/source/utils.cpp @@ -127,48 +127,6 @@ vector split_fields(const string &str, char sep, int max_split) return split_fields(str, string(1, sep), max_split); } -/** -Splits a string to parts. - -@param str String to be split -@param sep A set of separator characters -@param allow_empty Whether or not to produce empty parts for sequences of - more than one separator character -*/ -vector split(const string &str, const string &sep, bool allow_empty) -{ - vector result; - - string::size_type start=0; - if(!allow_empty) - start=str.find_first_not_of(sep); - - while(start split(const string &str, char sep, bool allow_empty) -{ - return split(str, string(1, sep), allow_empty); -} - string strip(const string &s) { string result=s;