Some cleanup, and bite the bullet and go ahead and write a simple Http client. Need a cross-platform built-in one to do cli right.

This commit is contained in:
Adam Ierymenko 2015-04-16 14:13:44 -07:00
parent 6c29e966dd
commit 53cbe485f0
14 changed files with 470 additions and 726 deletions

View file

@ -220,6 +220,15 @@ public:
* @return True if entire file was successfully written
*/
static inline bool writeFile(const char *path,const std::string &s) { return writeFile(path,s.data(),(unsigned int)s.length()); }
/**
* @param c ASCII character to convert
* @return Lower case ASCII character or unchanged if not a letter
*/
static inline char toLower(char c) throw() { return (char)OSUtils::TOLOWER_TABLE[(unsigned long)c]; }
private:
static const unsigned char TOLOWER_TABLE[256];
};
} // namespace ZeroTier