|
|||
|
|||
|
#include <hashcomp.h>
Collaboration diagram for irc::stringjoiner:

Public Member Functions | |
| 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. | |
| 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. | |
| stringjoiner (const std::string &seperator, const char **sequence, int begin, int end) | |
| Join elements of an array of char arrays, between (and including) begin and end. | |
| std::string & | GetJoined () |
| Get the joined sequence. | |
Private Attributes | |
| std::string | joined |
| Output string. | |
This class can join a vector of std::string, a deque of std::string, or a const char** array, using overloaded constructors.
Definition at line 144 of file hashcomp.h.
|
||||||||||||||||||||
|
Join elements of a vector, between (and including) begin and end.
Definition at line 385 of file hashcomp.cpp. References joined. 00386 { 00387 for (int v = begin; v < end; v++) 00388 joined.append(sequence[v]).append(seperator); 00389 joined.append(sequence[end]); 00390 }
|
|
||||||||||||||||||||
|
Join elements of a deque, between (and including) begin and end.
Definition at line 392 of file hashcomp.cpp. References joined. 00393 { 00394 for (int v = begin; v < end; v++) 00395 joined.append(sequence[v]).append(seperator); 00396 joined.append(sequence[end]); 00397 }
|
|
||||||||||||||||||||
|
Join elements of an array of char arrays, between (and including) begin and end.
Definition at line 399 of file hashcomp.cpp. References joined. 00400 { 00401 for (int v = begin; v < end; v++) 00402 joined.append(sequence[v]).append(seperator); 00403 joined.append(sequence[end]); 00404 }
|
|
|
Get the joined sequence.
Definition at line 406 of file hashcomp.cpp. References joined. Referenced by ListModeBase::DoSyncChannel(), cmd_saquit::Handle(), RemoveBase::Handle(), and ModuleChanProtect::OnSyncChannel(). 00407 { 00408 return joined; 00409 }
|
|
|
Output string.
Definition at line 149 of file hashcomp.h. Referenced by GetJoined(), and stringjoiner(). |