diff options
| author | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2023-02-19 13:45:56 +0000 |
|---|---|---|
| committer | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2023-02-19 13:45:56 +0000 |
| commit | 38c25bb50d76409193db2438db60369f3868edf9 (patch) | |
| tree | 6450e68c394691c222209addb76d9940998a5c95 /src/helpers/MiscFunctions.cpp | |
| parent | 6548439f6ce205795bfe55fc22d30830c725e0d2 (diff) | |
Added a crash reporter
Diffstat (limited to 'src/helpers/MiscFunctions.cpp')
| -rw-r--r-- | src/helpers/MiscFunctions.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/helpers/MiscFunctions.cpp b/src/helpers/MiscFunctions.cpp index 40121de3..dcc1efbd 100644 --- a/src/helpers/MiscFunctions.cpp +++ b/src/helpers/MiscFunctions.cpp @@ -549,4 +549,13 @@ double normalizeAngleRad(double ang) { } return ang; +} + +std::string replaceInString(std::string subject, const std::string& search, const std::string& replace) { + size_t pos = 0; + while ((pos = subject.find(search, pos)) != std::string::npos) { + subject.replace(pos, search.length(), replace); + pos += replace.length(); + } + return subject; }
\ No newline at end of file |
