mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-12 21:07:13 +02:00
Api (#48)
* 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
This commit is contained in:
18
slsSupportLib/src/ToString.cpp
Normal file
18
slsSupportLib/src/ToString.cpp
Normal file
@ -0,0 +1,18 @@
|
||||
#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
|
Reference in New Issue
Block a user