log4shib::StringUtil(3)

πŸ“¦ version 2.0.1, in opensuse-leap 16.0

πŸ’– 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 a va_list of arguments, analogously to vprintf(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 an output_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 segments
  • s β€” The string to split into segments.
  • delimiter β€” The delimiter character
  • 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 β€” 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 β€” 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 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 β€” the va_list of 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 πŸŒˆπŸ‘‘