Libmagicxx v5.5.0
A C++ wrapper library over the Magic Number Recognition Library.
 
Loading...
Searching...
No Matches
utility Namespace Reference

Concepts

concept  range_container
 Define requirements for a range container.
 
concept  string_converter
 Define requirements for a string converter.
 

Functions

template<range_container ContainerType, typename StringConverterType >
requires string_converter< typename ContainerType::value_type, StringConverterType>
std::string to_string (const ContainerType &container, const std::string &value_separator, StringConverterType string_converter)
 Convert any container to string using the string_converter.
 

Function Documentation

◆ to_string()

template<range_container ContainerType, typename StringConverterType >
requires string_converter< typename ContainerType::value_type, StringConverterType>
std::string utility::to_string ( const ContainerType & container,
const std::string & value_separator,
StringConverterType string_converter )
inlinenodiscard

Convert any container to string using the string_converter.

Template Parameters
ContainerTypeThe type of the container.
StringConverterTypeThe type of the string converter callable.
Parameters
[in]container
[in]value_separatorThe separator between the values of the container.
[in]string_converterThe callable that converts values of the container to string.
Returns
The container as a string.