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

Functions

template<typename ContainerType , typename StringConverterType >
requires std::ranges::range<ContainerType> && requires (ContainerType c){c.empty(); typename ContainerType::value_type;}
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<typename ContainerType , typename StringConverterType >
requires std::ranges::range<ContainerType> && requires (ContainerType c){c.empty(); typename ContainerType::value_type;}
std::string utility::to_string ( const ContainerType & container,
const std::string & value_separator,
StringConverterType string_converter )
inline

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.