nfd::tools::nfdc::text::Separator Class Reference

print different string on first and subsequent usage More...

#include <tools/nfdc/format-helpers.hpp>

+ Inheritance diagram for nfd::tools::nfdc::text::Separator:
+ Collaboration diagram for nfd::tools::nfdc::text::Separator:

Public Member Functions

 Separator (const std::string &first, const std::string &subsequent)
 Separator (const std::string &subsequent)
int getCount () const


std::ostream & operator<< (std::ostream &os, Separator &sep)

Detailed Description

print different string on first and subsequent usage

Separator sep(",");
for (int i = 1; i <= 3; ++i) {
os << sep << i;
// prints: 1,2,3

Definition at line 102 of file format-helpers.hpp.

Constructor & Destructor Documentation

nfd::tools::nfdc::text::Separator::Separator ( const std::string &  first,
const std::string &  subsequent 

Definition at line 131 of file format-helpers.cpp.

nfd::tools::nfdc::text::Separator::Separator ( const std::string &  subsequent)

Definition at line 138 of file format-helpers.cpp.

Member Function Documentation

int nfd::tools::nfdc::text::Separator::getCount ( ) const

Definition at line 111 of file format-helpers.hpp.

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
Separator sep 

Definition at line 144 of file format-helpers.cpp.