diff options
Diffstat (limited to 'osdep/OSUtils.hpp')
-rw-r--r-- | osdep/OSUtils.hpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/osdep/OSUtils.hpp b/osdep/OSUtils.hpp index fe054ba2..0cf4916b 100644 --- a/osdep/OSUtils.hpp +++ b/osdep/OSUtils.hpp @@ -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 |