libzypp: zypp::str::Str Class Reference

libzypp 17.36.6

Public Member Functions | Private Attributes | Related Symbols | List of all members
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>
Str & | operator<< (Tp &&val)
Str & | operator<< (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

## Related Symbols
(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 );
zypp::str::Str
Convenient building of std::string via std::ostringstream Basically a std::ostringstream autoconverti...
Definition String.h:212

Definition at line 211 of file String.h.

## Member Function Documentation

## ◆ operator<<() [1/2]

template<class Tp>

Str & zypp::str::Str::operator<< | ( | Tp && | val | ) |
| inline

Definition at line 214 of file String.h.

## ◆ operator<<() [2/2]

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

Definition at line 217 of file String.h.

## ◆ operator std::string()

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

Definition at line 220 of file String.h.

## ◆ asString()

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

Definition at line 221 of file String.h.

## ◆ str()

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

Definition at line 222 of file String.h.

## ◆ stream() [1/2]

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

Definition at line 224 of file String.h.

## ◆ stream() [2/2]

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

Definition at line 225 of file String.h.

## ◆ clear()

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

Definition at line 227 of file String.h.

## Friends And Related Symbol Documentation

## ◆ operator<<()

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

Stream output.

Definition at line 234 of file String.h.

## Member Data Documentation

## ◆ _str

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

Definition at line 230 of file String.h.

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

- zypp-core/base/String.h