log4shib::StringUtil(3)
π log4shib::StringUtil(3) π
okay bestie, welcome to the Library Functions Manual page for log4shib::StringUtil β itβs a whole little string-toolbox situation, and weβre gonna go through every single detail together β¨
πΈ NAME πΈ
log4shib::StringUtil β thatβs the name, bestie. Itβs giving utility-class energy for string stuff π
π¦ SYNOPSIS π¦
#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). π«Άstatic std::string trim (const std::string &s)β returns a string identical to the given string but without leading or trailing HTABs or spaces.static unsigned int split (std::vector< std::string > &v, const std::string &s, char delimiter, unsigned int maxSegments=INT_MAX)β the vector flavor; deets are down below π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 π
π§ split β the std::vector< std::string > version
unsigned int log4shib::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 literally the whole vibe of this one π
Parameters
vβ The vector in which the segments will be stored. The vector will be emptied before storing the segmentssβ The string to split into segments.delimiterβ The delimiter charactermaxSegmentsβ 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).
π split β the template<typename T> version
template<typename T> unsigned int log4shib::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. this one is giving βflexible output, main character energyβ π
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 charactermaxSegmentsβ The maximum number of segments.
Returns
The actual number of segments (limited by maxSegments).
πΈ trim
std::string log4shib::StringUtil::trim (const std::string & s) [static]
Returns a string identical to the given string but without leading or trailing HTABs or spaces. so itβs basically βcut the extra off, bestieβ βοΈβ¨
π vform
std::string log4shib::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).
Parameters
formatβ the format specifier.argsβ theva_listof arguments.
π Author π
Generated automatically by Doxygen for log4shib from the source code. Doxygen really said βIβll do it myselfβ ππ
okay bestie, thatβs the whole page! this footer is stamped with source log4shib, Version 2.0.1, and the page name log4shib::StringUtil(3) β no date printed, periodt ππ
π¦ where this page comes from
- opensuse-leap 16.0: liblog4shib-devel 2.0.1-160000.3.2 Β· LGPL-2.1-only
- opensuse-leap 16.0: liblog4shib-devel 2.0.1-160000.3.2 Β· LGPL-2.1-only
- opensuse-leap 16.0: liblog4shib-devel 2.0.1-160000.3.2 Β· LGPL-2.1-only
- opensuse-leap 16.0: liblog4shib-devel 2.0.1-160000.3.2 Β· 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