|
@@ -39,7 +39,7 @@ namespace ABACUS {
|
39
|
39
|
|
40
|
40
|
// Inexplicably missing string functions in standard library:
|
41
|
41
|
|
42
|
|
- std::string replace(const std::string& str, const std::string& from, const std::string& to) {
|
|
42
|
+ inline std::string replace(const std::string& str, const std::string& from, const std::string& to) {
|
43
|
43
|
std::string repl = str;
|
44
|
44
|
size_t start_pos = repl.find(from);
|
45
|
45
|
if(start_pos < std::string::npos)
|
|
@@ -47,7 +47,7 @@ namespace ABACUS {
|
47
|
47
|
return repl;
|
48
|
48
|
}
|
49
|
49
|
|
50
|
|
- std::string replace_all(const std::string& str, const std::string& from, const std::string& to) {
|
|
50
|
+ inline std::string replace_all(const std::string& str, const std::string& from, const std::string& to) {
|
51
|
51
|
std::string repl = str;
|
52
|
52
|
if(from.empty())
|
53
|
53
|
return repl;
|