mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-15 06:17:12 +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:
@ -47,6 +47,18 @@ std::string concatenateIfDifferent(const std::vector<T> &container) {
|
||||
}
|
||||
}
|
||||
|
||||
std::string RemoveUnit(std::string &str) {
|
||||
auto it = str.begin();
|
||||
while (it != str.end()) {
|
||||
if (std::isalpha(*it))
|
||||
break;
|
||||
++it;
|
||||
}
|
||||
auto pos = it - str.begin();
|
||||
auto unit = str.substr(pos);
|
||||
str.erase(it, end(str));
|
||||
return unit;
|
||||
}
|
||||
|
||||
template std::string concatenateIfDifferent(const std::vector<IpAddr> &);
|
||||
template std::string concatenateIfDifferent(const std::vector<MacAddr> &);
|
||||
|
Reference in New Issue
Block a user