logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

log4tango::StringUtil

Author

       Generated automatically by Doxygen for log4tango from the source code.

Version 5.0.1                                    Fri Feb 14 2020                        log4tango::StringUtil(3)

Member Function Documentation

unsignedintlog4tango::StringUtil::split(std::vector<std::string>&v,conststd::string&s,chardelimiter,unsignedintmaxSegments=INT_MAX)[static]
       splits a string into a vector of string segments based on the given delimiter.

       Parametersv 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).

   template<typenameT>staticunsignedintlog4tango::StringUtil::split(T&output,conststd::string&s,chardelimiter,unsignedintmaxSegments=INT_MAX)[inline],[static]
       splits a string into string segments based on the given delimiter and assigns the segments through an
       output_iterator.

       Parametersoutput 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).

   std::stringlog4tango::StringUtil::trim(conststd::string&s)[static]
       Returns a string identical to the given string but without leading or trailing HTABs or spaces.

   std::stringlog4tango::StringUtil::vform(constchar*format,va_listargs)[static]
       Returns a string contructed from the a format specifier and a va_list of arguments, analogously to
       vprintf(3).

       Parametersformat the format specifier.
           args the va_list of arguments.

Name

       log4tango::StringUtil

Synopsis

       #include <StringUtil.hh>

   StaticPublicMemberFunctions
       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)
           splits a string into a vector of string segments based on the given delimiter.
       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.

See Also