mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-13 05:17:13 +02:00
WIP
This commit is contained in:
@ -36,4 +36,14 @@ bool is_int(const std::string &s) {
|
||||
}) == s.end();
|
||||
}
|
||||
|
||||
bool replace_first(std::string *s, const std::string& substr, const std::string& repl){
|
||||
auto pos = s->find(substr);
|
||||
if (pos != std::string::npos){
|
||||
s->replace(pos, substr.size(), repl);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
}; // namespace sls
|
Reference in New Issue
Block a user