| Home | Libraries | People | FAQ | More

#### buffers_to_string

Return a string representing the contents of a buffer sequence.

##### Synopsis

Defined in header `<boost/beast/core/buffers_to_string.hpp>`

    template<
        class ConstBufferSequence>
    std::string
    buffers_to_string(
        ConstBufferSequence const& buffers);

##### Description

This function returns a string representing an entire buffer sequence. Nulls and unprintable characters in the buffer sequence are inserted to the resulting string as-is. No character conversions are performed.

##### Parameters

Name | Description
--- | ---
`buffers` | The buffer sequence to convert

##### Example

This function writes a buffer sequence converted to a string to `std::cout`.

    template<class ConstBufferSequence>
    void print(ConstBufferSequence const& buffers)
    {
        std::cout << buffers_to_string(buffers) << std::endl;
    }

Convenience header `<boost/beast/core.hpp>`