--- trunk/OOPSE-4/src/utils/StringUtils.hpp 2005/11/16 23:10:02 2448 +++ trunk/OOPSE-4/src/utils/StringUtils.hpp 2006/08/30 18:42:29 2982 @@ -102,7 +102,11 @@ namespace oopse { */ int isEndLine(char *line); + bool CaseInsensitiveEquals(char ch1, char ch2); + size_t CaseInsensitiveFind(const std::string& str1, const std::string& str2); + + /** * Convert a variable to a string * @param T data type @@ -139,6 +143,8 @@ namespace oopse { } return ret; } + + bool isInteger(const std::string& str); std::string OOPSE_itoa(int value, unsigned int base = 10); @@ -148,8 +154,24 @@ namespace oopse { /**@todo need implementation */ std::string getSuffix(const std::string& str); - +template +std::string containerToString(const ContainerType& cont) { + std::ostringstream oss; + oss << "("; + typename ContainerType::const_iterator i = cont.begin(); + if (i != cont.end()) { + oss << *i; + ++i; + } + for (; i != cont.end();++i) { + oss << ", "; + oss << *i; + } + oss << ")"; + return oss.str(); +} + } #endif