diff options
Diffstat (limited to 'src/helpers/VarList.hpp')
| -rw-r--r-- | src/helpers/VarList.hpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/helpers/VarList.hpp b/src/helpers/VarList.hpp index 60e9a551..8f33f166 100644 --- a/src/helpers/VarList.hpp +++ b/src/helpers/VarList.hpp @@ -1,4 +1,5 @@ #pragma once +#include <functional> #include <vector> #include <string> #include "../macros.hpp" @@ -20,6 +21,15 @@ class CVarList { std::string join(const std::string& joiner, size_t from = 0, size_t to = 0) const; + void map(std::function<void(std::string&)> func) { + for (auto& s : m_vArgs) + func(s); + } + + void append(const std::string arg) { + m_vArgs.emplace_back(arg); + } + std::string operator[](const size_t& idx) const { if (idx >= m_vArgs.size()) return ""; |
