Function format_keys

Synopsis

#include <toml/serializer.hpp>

template <typename charT, typename traits, typename Alloc>
std::basic_string< charT, traits, Alloc > format_keys(const std::vector< std::basic_string< charT, traits, Alloc >> &keys)

Description

No description yet.

Source

Lines 59-73 in toml/serializer.hpp.

template<typename charT, typename traits, typename Alloc>
std::basic_string<charT, traits, Alloc>
format_keys(const std::vector<std::basic_string<charT, traits, Alloc>>& keys)
{
    std::basic_string<charT, traits, Alloc> serialized;
    if(keys.empty()) {return serialized;}

    for(const auto& ky : keys)
    {
        serialized += format_key(ky);
        serialized += charT('.');
    }
    serialized.pop_back(); // remove the last dot '.'
    return serialized;
}





Add Discussion as Guest

Log in