28 #ifndef _LOG4TANGO_STRINGUTIL_H
29 #define _LOG4TANGO_STRINGUTIL_H
49 static std::string
vform(
const char* format, va_list args);
55 static std::string
trim(
const std::string& s);
70 static unsigned int split(std::vector<std::string>& v,
71 const std::string& s,
char delimiter,
72 unsigned int maxSegments = INT_MAX);
85 static unsigned int split(T& output,
86 const std::string& s,
char delimiter,
87 unsigned int maxSegments = INT_MAX)
89 std::string::size_type left = 0;
91 for (i = 1; i < maxSegments; i++) {
92 std::string::size_type right = s.find(delimiter, left);
93 if (right == std::string::npos) {
96 *output++ = s.substr(left, right - left);
99 *output++ = s.substr(left);
106 #endif // _LOG4TANGO_STRINGUTIL_HH