libzypp: zypp::str::SafeBuf Struct Reference

libzypp 17.38.11

zypp::str::SafeBuf Struct Reference
RAII solutions

Assert `free` called for allocated char *. More...

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

## Public Member Functions
| SafeBuf ()
| ~SafeBuf ()
std::string | asString () const

## Public Attributes
char * | _buf

## Detailed Description

Assert `free` called for allocated char *.

...
SafeBuf safe;
vasprintf( &safe._buf, format, ap );
return safe.asString();

Definition at line 191 of file String.h.

## Constructor & Destructor Documentation

## ◆ SafeBuf()

zypp::str::SafeBuf::SafeBuf | ( |  | ) |
| inline

Definition at line 194 of file String.h.

## ◆ ~SafeBuf()

zypp::str::SafeBuf::~SafeBuf | ( |  | ) |
| inline

Definition at line 195 of file String.h.

## Member Function Documentation

## ◆ asString()

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

Definition at line 196 of file String.h.

## Member Data Documentation

## ◆ _buf

char* zypp::str::SafeBuf::_buf

Definition at line 193 of file String.h.

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

- zypp-core/base/String.h