Add overloads to joing NULL-terminated arrays with
join_string().
return result;
} // eo join_string(const std::vector< std::string >&,const std::string&)
+std::string join_string (
+ const char *const parts[], /* assumed NULL-terminated */
+ const std::string& delimiter
+)
+{
+ std::string result;
+
+ if (parts != NULL)
+ {
+ const char *const *cur = parts;
+
+ if (*cur != NULL) {
+ result = std::string (*cur);
+
+ while (*++cur != NULL) {
+ result += delimiter;
+ result += std::string (*cur);
+ }
+ }
+ }
+
+ return result;
+}
+
/*
const std::string& delimiter = "\n"
);
+std::string join_string(
+ const char *const parts [],
+ const std::string& delimiter = "\n"
+);
+
/*
** conversions: