#include <cstring>
#include <vector>
#include <sstream>
+#include <cctype>
+
+#define STRINGIFY(x) #x
+#define TOSTRING(x) STRINGIFY(x)
struct FlagDesc {
const char *name;
return res;
}
+inline bool is_number(const std::string& tocheck)
+{
+ std::string::const_iterator iter = tocheck.begin();
+
+ while (iter != tocheck.end() && std::isdigit(*iter)) {
+ ++iter;
+ }
+
+ return ((!tocheck.empty()) && (iter == tocheck.end()));
+}
+
std::string translatePassword(std::string playername, std::wstring password);
std::string urlencode(std::string str);
std::string urldecode(std::string str);