about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorStar Rauchenberger <fefferburbia@gmail.com>2023-02-17 09:33:32 -0500
committerStar Rauchenberger <fefferburbia@gmail.com>2023-02-17 09:33:32 -0500
commitbfe86f537030739f2f82c3e2ddcbe97eff7ef0ed (patch)
tree92b022f9172b0797bc1186649f156c031fbc50bb
parentade8cc43b138fb776c16fe2b4de18c92e148c9c7 (diff)
downloadhkutil-bfe86f537030739f2f82c3e2ddcbe97eff7ef0ed.tar.gz
hkutil-bfe86f537030739f2f82c3e2ddcbe97eff7ef0ed.tar.bz2
hkutil-bfe86f537030739f2f82c3e2ddcbe97eff7ef0ed.zip
Added convenience container implode function
-rw-r--r--hkutil/string.h8
1 files changed, 8 insertions, 0 deletions
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 {
62 return result.str(); 62 return result.str();
63 } 63 }
64 64
65 template <class Container>
66 std::string implode(
67 const Container& container,
68 std::string delimiter)
69 {
70 return implode(container.begin(), container.end(), delimiter);
71 }
72
65 template <class OutputIterator> 73 template <class OutputIterator>
66 void split( 74 void split(
67 std::string input, 75 std::string input,