6#ifndef SPIRIT_PO_PO_MESSAGE_HPP_INCLUDED
7#define SPIRIT_PO_PO_MESSAGE_HPP_INCLUDED
9#include <boost/optional/optional.hpp>
42inline std::string debug_string(
const po_message & msg) {
43 std::string result =
"{\n";
45 result +=
" context: \"" + *msg.context +
"\"\n";
47 result +=
" id: \"" + msg.id +
"\"\n";
48 result +=
" id_plural: \"" + msg.id_plural() +
"\"\n";
49 result +=
" strings: { ";
51 if (
i) { result +=
", "; }
52 result +=
'"' + msg.strings()[
i] +
'"';
std::pair< std::string, std::vector< std::string > > plural_and_strings_type
std::size_t size(std::string_view str)
Length in characters of a UTF-8 string.
plural_and_strings_type plural_and_strings
const std::string & id_plural() const
boost::optional< std::string > context
const std::vector< std::string > & strings() const
std::vector< std::string > & strings()
std::string & id_plural()