mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-12-30 08:01:18 +01:00
Dev/define cmd tie bit to reg (#1328)
* strong type wip * moved everythign to bit_utils class * wip, still on testing in ctb reg * passed tests for define
This commit is contained in:
@@ -43,6 +43,15 @@ bool is_int(const std::string &s) {
|
||||
}) == s.end();
|
||||
}
|
||||
|
||||
bool is_hex_or_dec_int(const std::string &s) {
|
||||
try {
|
||||
StringTo<int>(s);
|
||||
return true;
|
||||
} catch (...) {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool replace_first(std::string *s, const std::string &substr,
|
||||
const std::string &repl) {
|
||||
auto pos = s->find(substr);
|
||||
|
||||
Reference in New Issue
Block a user