From bfe86f537030739f2f82c3e2ddcbe97eff7ef0ed Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Fri, 17 Feb 2023 09:33:32 -0500 Subject: Added convenience container implode function --- hkutil/string.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/hkutil/string.h b/hkutil/string.h index a8cafc6..03c5088 100644 --- a/hkutil/string.h +++ b/hkutil/string.h @@ -62,6 +62,14 @@ namespace hatkirby { return result.str(); } + template + std::string implode( + const Container& container, + std::string delimiter) + { + return implode(container.begin(), container.end(), delimiter); + } + template void split( std::string input, -- cgit 1.4.1