From 8bb908a8da3be119cc64552d4fe8a23cdfb938b8 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Thu, 5 May 2022 12:50:25 +0200 Subject: Added focusmonitor --- src/helpers/MiscFunctions.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/helpers/MiscFunctions.cpp') 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 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 -- cgit v1.2.3