[Commands] Nested Command Aliases (#2636)

This commit is contained in:
Chris Miles
2022-12-14 22:26:05 -06:00
committed by GitHub
parent 6ddd5db480
commit dce5f03e74
5 changed files with 137 additions and 90 deletions
+10
View File
@@ -200,6 +200,16 @@ bool Strings::IsNumber(const std::string &s)
}
}
bool Strings::IsFloat(const std::string &s)
{
try {
auto r = stof(s);
return true;
}
catch (std::exception &) {
return false;
}
}
std::string Strings::Join(const std::vector<std::string> &ar, const std::string &delim)
{
+1
View File
@@ -86,6 +86,7 @@ public:
static bool Contains(std::vector<std::string> container, std::string element);
static bool Contains(const std::string& subject, const std::string& search);
static bool IsNumber(const std::string &s);
static bool IsFloat(const std::string &s);
static const std::string ToLower(std::string s);
static const std::string ToUpper(std::string s);
static const std::string UcFirst(std::string s);