InspIRCd  2.0
 All Classes Namespaces Functions Variables Typedefs Enumerations
Public Member Functions | List of all members
irc::stringjoiner Class Reference

#include <hashcomp.h>

Public Member Functions

 stringjoiner (const std::string &seperator, const std::vector< std::string > &sequence, int begin, int end)
 
 stringjoiner (const std::string &seperator, const std::deque< std::string > &sequence, int begin, int end)
 
 stringjoiner (const std::string &seperator, const char *const *sequence, int begin, int end)
 
std::string & GetJoined ()
 

Detailed Description

irc::stringjoiner joins string lists into a string, using the given seperator string. This class can join a vector of std::string, a deque of std::string, or a const char* const* array, using overloaded constructors.

Constructor & Destructor Documentation

irc::stringjoiner::stringjoiner ( const std::string &  seperator,
const std::vector< std::string > &  sequence,
int  begin,
int  end 
)

Join elements of a vector, between (and including) begin and end

Parameters
seperatorThe string to seperate values with
sequenceOne or more items to seperate
beginThe starting element in the sequence to be joined
endThe ending element in the sequence to be joined
irc::stringjoiner::stringjoiner ( const std::string &  seperator,
const std::deque< std::string > &  sequence,
int  begin,
int  end 
)

Join elements of a deque, between (and including) begin and end

Parameters
seperatorThe string to seperate values with
sequenceOne or more items to seperate
beginThe starting element in the sequence to be joined
endThe ending element in the sequence to be joined
irc::stringjoiner::stringjoiner ( const std::string &  seperator,
const char *const *  sequence,
int  begin,
int  end 
)

Join elements of an array of char arrays, between (and including) begin and end

Parameters
seperatorThe string to seperate values with
sequenceOne or more items to seperate
beginThe starting element in the sequence to be joined
endThe ending element in the sequence to be joined

Member Function Documentation

std::string & irc::stringjoiner::GetJoined ( )

Get the joined sequence

Returns
A reference to the joined string

The documentation for this class was generated from the following files: