libzypp 17.37.17
zypp::str::Str Class Reference

Convenient building of std::string via std::ostringstream Basically a std::ostringstream autoconvertible to std::string for building string arguments. More...

#include <zypp-core/base/String.h>

Public Member Functions

template<class Tp>
Stroperator<< (Tp &&val)
Stroperator<< (std::ostream &(*iomanip)(std::ostream &))
 operator std::string () const
std::string asString () const
std::string str () const
const std::ostream & stream () const
std::ostream & stream ()
void clear ()

Private Attributes

std::ostringstream _str

(Note that these are not member symbols.)

std::ostream & operator<< (std::ostream &str, const Str &obj)
 Stream output.

Detailed Description

Convenient building of std::string via std::ostringstream Basically a std::ostringstream autoconvertible to std::string for building string arguments.

void fnc( const std::string & txt_r );
fnc( str::Str() << "Hello " << 13 );
std::string txt( str::Str() << 45 );
Convenient building of std::string via std::ostringstream Basically a std::ostringstream autoconverti...
Definition String.h:213

Definition at line 212 of file String.h.

Member Function Documentation

◆ operator<<() [1/2]

template<class Tp>
Str & zypp::str::Str::operator<< ( Tp && val)
inline

Definition at line 215 of file String.h.

◆ operator<<() [2/2]

Str & zypp::str::Str::operator<< ( std::ostream &(* iomanip )(std::ostream &))
inline

Definition at line 218 of file String.h.

◆ operator std::string()

zypp::str::Str::operator std::string ( ) const
inline

Definition at line 221 of file String.h.

◆ asString()

std::string zypp::str::Str::asString ( ) const
inline

Definition at line 222 of file String.h.

◆ str()

std::string zypp::str::Str::str ( ) const
inline

Definition at line 223 of file String.h.

◆ stream() [1/2]

const std::ostream & zypp::str::Str::stream ( ) const
inline

Definition at line 225 of file String.h.

◆ stream() [2/2]

std::ostream & zypp::str::Str::stream ( )
inline

Definition at line 226 of file String.h.

◆ clear()

void zypp::str::Str::clear ( )
inline

Definition at line 228 of file String.h.

◆ operator<<()

std::ostream & operator<< ( std::ostream & str,
const Str & obj )
related

Stream output.

Definition at line 235 of file String.h.

Member Data Documentation

◆ _str

std::ostringstream zypp::str::Str::_str
private

Definition at line 231 of file String.h.


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