mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-13 05:17:13 +02:00
less public headers
This commit is contained in:
@ -17,36 +17,6 @@ std::vector<std::string> split(const std::string &strToSplit, char delimeter) {
|
||||
return splittedStrings;
|
||||
}
|
||||
|
||||
std::string concatenateNonEmptyStrings(const std::vector<std::string> &vec) {
|
||||
std::string ret;
|
||||
for (const auto &s : vec)
|
||||
if (!s.empty())
|
||||
ret += s + '+';
|
||||
return ret;
|
||||
}
|
||||
|
||||
std::string concatenateIfDifferent(const std::vector<std::string> &container) {
|
||||
if (allEqual(container)) {
|
||||
return container.front();
|
||||
} else {
|
||||
std::string result;
|
||||
for (const auto &s : container)
|
||||
result += s + '+';
|
||||
return result;
|
||||
}
|
||||
}
|
||||
template <typename T>
|
||||
std::string concatenateIfDifferent(const std::vector<T> &container) {
|
||||
if (allEqual(container)) {
|
||||
return container.front().str();
|
||||
} else {
|
||||
std::string result;
|
||||
for (const auto &s : container)
|
||||
result += s.str() + '+';
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
std::string RemoveUnit(std::string &str) {
|
||||
auto it = str.begin();
|
||||
while (it != str.end()) {
|
||||
@ -60,7 +30,4 @@ std::string RemoveUnit(std::string &str) {
|
||||
return unit;
|
||||
}
|
||||
|
||||
template std::string concatenateIfDifferent(const std::vector<IpAddr> &);
|
||||
template std::string concatenateIfDifferent(const std::vector<MacAddr> &);
|
||||
|
||||
}; // namespace sls
|
Reference in New Issue
Block a user