return result;
}
-bool check_str(const std::string &str, int (*pred)(int))
+bool check_str(const string &str, int (*pred)(int))
{
for(string::const_iterator i=str.begin(); i!=str.end(); ++i)
if(!pred(*i))
return result;
}
-string c_unescape(const std::string &str)
+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 string &str)
{
bool escape = false;
unsigned numeric_type = 0;