diff options
| author | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-05-05 12:50:25 +0200 |
|---|---|---|
| committer | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-05-05 12:50:25 +0200 |
| commit | 8bb908a8da3be119cc64552d4fe8a23cdfb938b8 (patch) | |
| tree | 9126a09a72bdcce560405a8f79315ec703021b55 /src/helpers/MiscFunctions.cpp | |
| parent | c7fd3d46fde472c2e6c2801c9aa7e9376656e235 (diff) | |
Added focusmonitor
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 489fa02a..bf8724c6 100644 --- a/src/helpers/MiscFunctions.cpp +++ b/src/helpers/MiscFunctions.cpp @@ -1,5 +1,6 @@ #include "MiscFunctions.hpp" #include "../defines.hpp" +#include <algorithm> void addWLSignal(wl_signal* pSignal, wl_listener* pListener, void* pOwner, std::string ownerString) { ASSERT(pSignal); @@ -111,4 +112,12 @@ float getPlusMinusKeywordResult(std::string source, float relative) { } return result; +} + +bool isNumber(const std::string& str) { + return std::ranges::all_of(str.begin(), str.end(), [](char c) { return isdigit(c) != 0; }); +} + +bool isDirection(const std::string& arg) { + return arg == "l" || arg == "r" || arg == "u" || arg == "d" || arg == "t" || arg == "b"; }
\ No newline at end of file |
