MCPcopy Create free account
hub / github.com/Open-GD/OpenGD / get_bson_string

Method get_bson_string

Source/external/json.hpp:9297–9307  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9295 */
9296 template<typename NumberType>
9297 bool get_bson_string(const NumberType len, string_t& result)
9298 {
9299 if (JSON_HEDLEY_UNLIKELY(len < 1))
9300 {
9301 auto last_token = get_token_string();
9302 return sax->parse_error(chars_read, last_token, parse_error::create(112, chars_read,
9303 exception_message(input_format_t::bson, concat("string length must be at least 1, is ", std::to_string(len)), "string"), nullptr));
9304 }
9305
9306 return get_string(input_format_t::bson, len - static_cast<NumberType>(1), result) && get() != std::char_traits<char_type>::eof();
9307 }
9308
9309 /*!
9310 @brief Parses a byte array input of length @a len from the BSON input.

Callers

nothing calls this directly

Calls 6

get_token_stringFunction · 0.85
createFunction · 0.85
concatFunction · 0.85
getFunction · 0.85
to_stringFunction · 0.70
parse_errorMethod · 0.45

Tested by

no test coverage detected