mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 00:25:19 +02:00
Add formspec api versioning
This commit is contained in:
@@ -27,6 +27,9 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
#include <vector>
|
||||
#include <sstream>
|
||||
|
||||
#define STRINGIFY(x) #x
|
||||
#define TOSTRING(x) STRINGIFY(x)
|
||||
|
||||
struct FlagDesc {
|
||||
const char *name;
|
||||
u32 flag;
|
||||
@@ -316,6 +319,17 @@ inline std::string unescape_string(std::string &s)
|
||||
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);
|
||||
|
Reference in New Issue
Block a user