MCPcopy Create free account
hub / github.com/OpenFodder/openfodder / write_bson_string

Method write_bson_string

Source/Utils/json.hpp:13683–13692  ·  view source on GitHub ↗

! @brief Writes a BSON element with key @a name and string value @a value */

Source from the content-addressed store, hash-verified

13681 @brief Writes a BSON element with key @a name and string value @a value
13682 */
13683 void write_bson_string(const string_t& name,
13684 const string_t& value)
13685 {
13686 write_bson_entry_header(name, 0x02);
13687
13688 write_number<std::int32_t, true>(static_cast<std::int32_t>(value.size() + 1ul));
13689 oa->write_characters(
13690 reinterpret_cast<const CharType*>(value.c_str()),
13691 value.size() + 1);
13692 }
13693
13694 /*!
13695 @brief Writes a BSON element with key @a name and null value

Callers

nothing calls this directly

Calls 2

sizeMethod · 0.45
write_charactersMethod · 0.45

Tested by

no test coverage detected