log4cpp::StringUtil(3)
π NAME π
okay so log4cpp::StringUtil is the string utility class from log4cpp, and this page is straight outta the Library Functions Manual (section 3). She's giving "I make strings behave" energy, and honestly? Iconic. π
β¨ SYNOPSIS β¨
First things first, bestie, you gotta pull in the header:
#include <StringUtil.hh>
π Static Public Member Functions π
static std::string vform (const char *format, va_list args)β returns a string contructed from the a format specifier and ava_listof arguments, analogously tovprintf(3). Yes, the original says "contructed" and "the a" β we're preserving the lore, not fixing it. πstatic std::string trim (const std::string &s)β returns a string identical to the given string but without leading or trailingHTABs or spaces. Clean girl aesthetic fr.static unsigned int split (std::vector< std::string > &v, const std::string &s, char delimiter, unsigned int maxSegments=INT_MAX)β thestd::vectoroverload; full breakdown is down in Member Function Documentation, bestie.template<typename T> static unsigned int split (T &output, const std::string &s, char delimiter, unsigned int maxSegments=INT_MAX)β splits a string into string segments based on the given delimiter and assigns the segments through anoutput_iterator.
π Member Function Documentation π
π§΅ vector split overload π§΅
unsigned int log4cpp::StringUtil::split (std::vector< std::string > & v, const std::string & s, char delimiter, unsigned int maxSegments = INT_MAX) [static]
splits a string into a vector of string segments based on the given delimiter. No cap, that's the whole vibe.
Parameters:
vβ The vector in which the segments will be stored. The vector will be emptied before storing the segments.sβ The string to split into segments.delimiterβ The delimiter character.maxSegmentsβ the maximum number of segments. Upon returnv.size() <= maxSegments. The string is scanned from left to right sov[maxSegments - 1]may contain a string containing the delimiter character. π
Returns: The actual number of segments (limited by maxSegments).
π§΅ template split overload π§΅
template<typename T> unsigned int log4cpp::StringUtil::split (T & output, const std::string & s, char delimiter, unsigned int maxSegments = INT_MAX) [inline], [static]
splits a string into string segments based on the given delimiter and assigns the segments through an output_iterator. It's giving iterator-core, and we're obsessed. β¨
Parameters:
outputβ Theoutput_iteratorthrough which to assign the string segments. Typically this will be aback_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. She's literally the "wash your face and drink water" of string functions. π«Ά
πͺ vform πͺ
std::string log4cpp::StringUtil::vform (const char * format, va_list args) [static]
Returns a string contructed from the a format specifier and a va_list of arguments, analogously to vprintf(3). Format-specifier girlies, this one's for you. π
Parameters:
formatβ the format specifier.argsβ theva_listof arguments.
π Author π
Generated automatically by Doxygen for log4cpp from the source code.
π Cute sign-off: log4cpp, Version 1.1 β log4cpp::StringUtil(3). The footer didn't print a date, so no date reveal today, bestie. πβ¨
π¦ where this page comes from
- opensuse-leap 16.0: log4cpp-devel 1.1.4-bp160.1.12 Β· LGPL-2.1-only
- opensuse-leap 16.0: log4cpp-devel 1.1.4-bp160.1.12 Β· LGPL-2.1-only
- opensuse-leap 16.0: log4cpp-devel 1.1.4-bp160.1.12 Β· LGPL-2.1-only
- opensuse-leap 16.0: log4cpp-devel 1.1.4-bp160.1.12 Β· LGPL-2.1-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms