#ifndef __UTIL_H__ #define __UTIL_H__ #include #include #include struct timeval; namespace Util { std::vector str_split(std::string input, std::string delimiter); void str_dump(const std::string& str); void str_clean(std::string* str, std::string search, std::string replace = ""); std::string readUrl(std::string url, std::string tempfile); std::string convertToUnicode(std::string); int uTimeDiff(const timeval& then, const timeval& now); int mTimeDiff(const timeval& then, const timeval& now); inline void Sleep(unsigned int msec) { for (unsigned int i=0; i