]> git.tdb.fi Git - libs/core.git/blobdiff - source/strings/utils.cpp
Remove deprecated things
[libs/core.git] / source / strings / utils.cpp
index a67eb15b1f4b2b738fecc1b40bc60e7e9e3a97f3..80e59f07a6cb5802eb741aa870a0498e2308fea0 100644 (file)
@@ -1,6 +1,7 @@
 #include <algorithm>
 #include <list>
 #include <stdexcept>
+#include <cctype>
 #include "utils.h"
 
 using namespace std;
@@ -129,6 +130,20 @@ string strip(const string &s)
        return result;
 }
 
+string &append(string &str, const string &sep, const string &other)
+{
+       if(!str.empty() && !other.empty())
+               str += sep;
+       str += other;
+       return str;
+}
+
+string join(const string &str1, const string &sep, const string &str2)
+{
+       string result = str1;
+       return append(result, sep, str2);
+}
+
 string c_unescape(const std::string &str)
 {
        bool escape = false;