mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2026-03-11 14:37:42 +01:00
* WIP * WIP * WIP * cleaned up multi * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * split up python module * WIP * WIP * WIP * WIP * WIP * ok * fixed bugs from rebase * WIP * fixed broken test * WIP * fixed python * WIP * sphinx help * including new commands * docs * WIP * WIP * more tests * added missing public header * WIP
18 lines
405 B
C++
18 lines
405 B
C++
#include "ToString.h"
|
|
|
|
namespace sls {
|
|
|
|
std::string ToString(const std::vector<std::string> &vec,
|
|
const char delimiter) {
|
|
std::ostringstream os;
|
|
if (vec.empty())
|
|
return os.str();
|
|
auto it = vec.cbegin();
|
|
os << *it++;
|
|
if (vec.size() > 1) {
|
|
while (it != vec.cend())
|
|
os << delimiter << *it++;
|
|
}
|
|
return os.str();
|
|
}
|
|
} // namespace sls
|