StringTools.h 751 B

12345678910111213141516171819202122232425262728293031323334
  1. #ifndef CPPUNIT_TOOLS_STRINGTOOLS_H
  2. #define CPPUNIT_TOOLS_STRINGTOOLS_H
  3. #include <cppunit/Portability.h>
  4. #include <string>
  5. #include <cppunit/portability/CppUnitVector.h>
  6. CPPUNIT_NS_BEGIN
  7. /*! \brief Tool functions to manipulate string.
  8. */
  9. struct StringTools
  10. {
  11. typedef CppUnitVector<std::string> Strings;
  12. static std::string CPPUNIT_API toString( int value );
  13. static std::string CPPUNIT_API toString( double value );
  14. static Strings CPPUNIT_API split( const std::string &text,
  15. char separator );
  16. static std::string CPPUNIT_API wrap( const std::string &text,
  17. int wrapColumn = CPPUNIT_WRAP_COLUMN );
  18. };
  19. CPPUNIT_NS_END
  20. #endif // CPPUNIT_TOOLS_STRINGTOOLS_H