From 3c6ea25bcfafc513560c9e8a4baaf211bec2750c Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Sat, 11 Jun 2016 22:39:24 +0300 Subject: kms++util: split to subdirs --- kms++util/strhelpers.h | 33 --------------------------------- 1 file changed, 33 deletions(-) delete mode 100644 kms++util/strhelpers.h (limited to 'kms++util/strhelpers.h') diff --git a/kms++util/strhelpers.h b/kms++util/strhelpers.h deleted file mode 100644 index 2c540f3..0000000 --- a/kms++util/strhelpers.h +++ /dev/null @@ -1,33 +0,0 @@ -#include -#include -#include -#include - -std::string to_lower(const std::string& str); - -template -std::string join(const T& values, const std::string& delim) -{ - std::ostringstream ss; - for (const auto& v : values) { - if (&v != &values[0]) - ss << delim; - ss << v; - } - return ss.str(); -} - -template -std::string join(const std::vector& values, const std::string& delim, std::function func) -{ - std::ostringstream ss; - for (const auto& v : values) { - if (&v != &values[0]) - ss << delim; - ss << func(v); - } - return ss.str(); -} - -std::string sformat(const char *fmt, ...) - __attribute__ ((format (printf, 1, 2))); -- cgit v1.2.3