Function write_table_item_header

Synopsis

#include <include/cpptoml.h>

void write_table_item_header(const base &b)

Description

Write out the identifier for an item in a table.

Source

Lines 3568-3590 in include/cpptoml.h.

void write_table_item_header(const base& b)
{
    if (!b.is_table() && !b.is_table_array())
    {
        indent();
        if (path_.back().find_first_not_of("ABCDEFGHIJKLMNOPQRSTUVWXYZabcde"
                                           "fghijklmnopqrstuvwxyz0123456789"
                                           "_-")
            == std::string::npos)
        {
            write(path_.back());
        }
        else
        {
            write("\"");
            write(escape_string(path_.back()));
            write("\"");
        }
        write(" = ");
    }
}





Add Discussion as Guest

Log in