#include <StringUtil.hh>
◆ split() [1/2]
splits a string into a vector of string segments based on the
given delimiter.
@param v The vector in which the segments will be stored. The vector
will be emptied before storing the segments
@param s The string to split into segments.
@param delimiter The delimiter character
@param maxSegments the maximum number of segments. Upon return
v.size() <= maxSegments. The string is scanned from left to right
so v[maxSegments - 1] may contain a string containing the delimiter
character.
- Returns
- The actual number of segments (limited by maxSegments).
◆ split() [2/2]
splits a string into string segments based on the given delimiter and assigns the segments through an output_iterator.
- Parameters
-
output | The output_iterator through which to assign the string segments. Typically this will be a back_insertion_iterator. |
s | The string to split into segments. |
delimiter | The delimiter character |
maxSegments | The maximum number of segments. |
- Returns
- The actual number of segments (limited by maxSegments).
◆ trim()
std::string log4cpp::StringUtil::trim |
( |
const std::string & | s | ) |
|
|
static |
Returns a string identical to the given string but without leading or trailing HTABs or spaces.
◆ vform()
Returns a string contructed from the a format specifier and a va_list of arguments, analogously to vprintf(3).
- Parameters
-
format | the format specifier. |
args | the va_list of arguments. |
The documentation for this class was generated from the following files: