mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-11 12:27:14 +02:00
added string concat to ToString
This commit is contained in:
@ -19,8 +19,17 @@
|
||||
|
||||
namespace sls {
|
||||
|
||||
// std::string ToString(const std::vector<std::string> &vec,
|
||||
// const char delimiter = ' ');
|
||||
inline std::string ToString(const std::vector<std::string> &vec,
|
||||
const char delimiter = ' ') {
|
||||
std::ostringstream os;
|
||||
if(!vec.empty()){
|
||||
auto it = vec.begin();
|
||||
os << *it++;
|
||||
while(it != vec.end())
|
||||
os << delimiter << *it++;
|
||||
}
|
||||
return os.str();
|
||||
}
|
||||
|
||||
/** Convert std::chrono::duration with specified output unit */
|
||||
template <typename T, typename Rep = double>
|
||||
|
Reference in New Issue
Block a user