CppUnit project page | FAQ

StringTools.h
Go to the documentation of this file.
1 #ifndef CPPUNIT_TOOLS_STRINGTOOLS_H
2 #define CPPUNIT_TOOLS_STRINGTOOLS_H
3
4 #include <cppunit/Portability.h>
5 #include <string>
6 #include <vector>
7
8
9 CPPUNIT_NS_BEGIN
10
11
14 struct StringTools
15 {
16
17 typedef std::vector<std::string> Strings;
18
19 static std::string CPPUNIT_API toString( int value );
20
21 static std::string CPPUNIT_API toString( double value );
22
23 static Strings CPPUNIT_API split( const std::string &text,
24 char separator );
25
26 static std::string CPPUNIT_API wrap( const std::string &text,
27 int wrapColumn = CPPUNIT_WRAP_COLUMN );
28
29 };
30
31
32 CPPUNIT_NS_END
33
34 #endif // CPPUNIT_TOOLS_STRINGTOOLS_H
CPPUNIT_API
#define CPPUNIT_API
Definition: CppUnitApi.h:27
StringTools::toString
static std::string CPPUNIT_API toString(int value)
Definition: StringTools.cpp:10
StringTools::split
static Strings CPPUNIT_API split(const std::string &text, char separator)
Definition: StringTools.cpp:28
StringTools
Tool functions to manipulate string.
Definition: StringTools.h:15
StringTools::wrap
static std::string CPPUNIT_API wrap(const std::string &text, int wrapColumn=CPPUNIT_WRAP_COLUMN)
Definition: StringTools.cpp:51
CPPUNIT_WRAP_COLUMN
#define CPPUNIT_WRAP_COLUMN
Definition: Portability.h:166
CPPUNIT_NS_BEGIN
#define CPPUNIT_NS_BEGIN
Definition: Portability.h:105
CPPUNIT_NS_END
#define CPPUNIT_NS_END
Definition: Portability.h:106
StringTools::Strings
std::vector< std::string > Strings
Definition: StringTools.h:17
Portability.h

| Send comments to: CppUnit Developers