mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2026-02-07 20:58:41 +01:00
clang format
This commit is contained in:
6
slsSupportLib/src/string_utils.cpp
Executable file → Normal file
6
slsSupportLib/src/string_utils.cpp
Executable file → Normal file
@@ -38,14 +38,14 @@ bool is_int(const std::string &s) {
|
||||
}) == s.end();
|
||||
}
|
||||
|
||||
bool replace_first(std::string *s, const std::string& substr, const std::string& repl){
|
||||
bool replace_first(std::string *s, const std::string &substr,
|
||||
const std::string &repl) {
|
||||
auto pos = s->find(substr);
|
||||
if (pos != std::string::npos){
|
||||
if (pos != std::string::npos) {
|
||||
s->replace(pos, substr.size(), repl);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
}; // namespace sls
|
||||
Reference in New Issue
Block a user