Clingo
Loading...
Searching...
No Matches
Clingo::StringBuilder Class Reference

A string builder for constructing strings. More...

#include <core.hh>

Public Member Functions

 StringBuilder ()
 Construct an empty string builder.
 
auto str () const -> std::string_view
 Get a view of the string built by the string builder.
 
void clear () noexcept
 Clear the string builder, removing all content.
 

Friends

auto c_cast (StringBuilder &bld) -> clingo_string_builder_t *
 Cast the string builder to its C representation.
 

Detailed Description

A string builder for constructing strings.

Some API functions accept a string builder to construct strings in a memory-efficient way.

String builders have value semantics.

Member Function Documentation

◆ str()

auto Clingo::StringBuilder::str ( ) const -> std::string_view
inline

Get a view of the string built by the string builder.

Returns
the string view of the built string

Friends And Related Symbol Documentation

◆ c_cast

auto c_cast ( StringBuilder bld) -> clingo_string_builder_t *
friend

Cast the string builder to its C representation.

Parameters
bldthe string builder to cast
Returns
the C representation of the string builder

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