diff options
author | Treeston <treeston.mmoc@gmail.com> | 2018-09-07 20:31:04 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2021-10-25 00:03:23 +0200 |
commit | 0c681b6509d4b517dc2e65a152753224df745605 (patch) | |
tree | 61c77765713f13d5d7006ef90e6c0a392ee6328a /src/common/Utilities/Util.h | |
parent | 42f366648f6b65753b3719f66b406e110ec9a871 (diff) |
Scripts/Commands: New argument parsing methodology (PR #22363)
- Detect the arguments accepted by the command handler
- Tokenize out those arguments automatically and feed them to the handler
- Unmatched rest of the string can be accepted by trailing char const* or CommandArgs*
(cherry picked from commit 66a87c4642d25f27ca24254cfeb0a0c4b21036b1)
Diffstat (limited to 'src/common/Utilities/Util.h')
-rw-r--r-- | src/common/Utilities/Util.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/common/Utilities/Util.h b/src/common/Utilities/Util.h index d7c26fb98da..259af5068ff 100644 --- a/src/common/Utilities/Util.h +++ b/src/common/Utilities/Util.h @@ -352,6 +352,8 @@ std::array<uint8, Size> HexStrToByteArray(std::string const& str, bool reverse = TC_COMMON_API bool StringToBool(std::string const& str); TC_COMMON_API float DegToRad(float degrees); +TC_COMMON_API bool StringContainsStringI(std::string const& haystack, std::string const& needle); + // simple class for not-modifyable list template <typename T> class HookList final |