Skip to content

Commit

Permalink
feat(src/common.hh): introduce 'SSC::join()'
Browse files Browse the repository at this point in the history
  • Loading branch information
jwerle committed Sep 26, 2023
1 parent dffb641 commit 015f930
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/common.hh
Original file line number Diff line number Diff line change
Expand Up @@ -369,8 +369,12 @@ namespace SSC {
const String& separator
) {
StringStream joined;
auto missing = vector.size();
for (const auto& item : vector) {
joined << item << separator << " ";
joined << item;
if (--missing > 0) {
joined << separator << " ";
}
}

return trim(joined.str());
Expand Down

0 comments on commit 015f930

Please sign in to comment.