2015-12-23 08:45:53 -05:00
|
|
|
namespace Utils
|
|
|
|
{
|
|
|
|
const char *VA(const char *fmt, ...);
|
|
|
|
std::string StrToLower(std::string input);
|
2015-12-24 08:28:08 -05:00
|
|
|
bool EndsWith(const char* heystack, const char* needle);
|
2015-12-25 15:42:35 -05:00
|
|
|
std::vector<std::string> Explode(const std::string& str, char delim);
|
2015-12-24 11:30:36 -05:00
|
|
|
void Replace(std::string &string, std::string find, std::string replace);
|
2015-12-24 13:21:10 -05:00
|
|
|
unsigned int OneAtATime(char *key, size_t len);
|
2015-12-24 11:30:36 -05:00
|
|
|
|
|
|
|
class InfoString
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
InfoString() {};
|
|
|
|
InfoString(std::string buffer) :InfoString() { this->Parse(buffer); };
|
2015-12-27 22:02:30 -05:00
|
|
|
InfoString(const InfoString &obj) { this->KeyValuePairs = obj.KeyValuePairs; };
|
2015-12-24 11:30:36 -05:00
|
|
|
|
|
|
|
void Set(std::string key, std::string value);
|
|
|
|
std::string Get(std::string key);
|
|
|
|
|
|
|
|
std::string Build();
|
|
|
|
|
2015-12-25 15:42:35 -05:00
|
|
|
void Dump();
|
|
|
|
|
2015-12-24 11:30:36 -05:00
|
|
|
private:
|
|
|
|
std::map<std::string, std::string> KeyValuePairs;
|
|
|
|
void Parse(std::string buffer);
|
|
|
|
};
|
2015-12-23 08:45:53 -05:00
|
|
|
}
|