// Copyright information and license terms for this software can be // found in the file LICENSE that is included with the distribution #ifndef STRING_UTILITY_H #define STRING_UTILITY_H #include #include namespace StringUtility { template std::string toString(const T& t); std::string toString(const char* s); std::string toString(char* s); std::string& leftTrim(std::string& s); std::string& rightTrim(std::string& s); std::string& trim(std::string& s); std::string trim(const std::string& s); // // Template implementation // template std::string toString(const T& t) { std::ostringstream result; result << t; return result.str(); } } #endif