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 | |
| parent | 6548439f6ce205795bfe55fc22d30830c725e0d2 (diff) | |
Added a crash reporter
Diffstat (limited to 'src/helpers')
| -rw-r--r-- | src/helpers/MiscFunctions.cpp | 9 | ||||
| -rw-r--r-- | src/helpers/MiscFunctions.hpp | 6 |
2 files changed, 11 insertions, 4 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 diff --git a/src/helpers/MiscFunctions.hpp b/src/helpers/MiscFunctions.hpp index 43cfb944..a5f21313 100644 --- a/src/helpers/MiscFunctions.hpp +++ b/src/helpers/MiscFunctions.hpp @@ -16,9 +16,7 @@ void logSystemInfo(); std::string execAndGet(const char*); int64_t getPPIDof(int64_t pid); int64_t configStringToInt(const std::string&); - float getPlusMinusKeywordResult(std::string in, float relative); - void matrixProjection(float mat[9], int w, int h, wl_output_transform tr); - -double normalizeAngleRad(double ang);
\ No newline at end of file +double normalizeAngleRad(double ang); +std::string replaceInString(std::string subject, const std::string& search, const std::string& replace);
\ No newline at end of file |
