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

Method to_string

Source/Utils/json.hpp:11598–11606  ·  view source on GitHub ↗

! @brief return a string representation of the JSON pointer @invariant For each JSON pointer `ptr`, it holds: @code {.cpp} ptr == json_pointer(ptr.to_string()); @endcode @return a string representation of the JSON pointer @liveexample{The example shows the result of `to_string`.,json_pointer__to_string} @since version 2.0.0

Source from the content-addressed store, hash-verified

11596 @since version 2.0.0
11597 */
11598 std::string to_string() const
11599 {
11600 return std::accumulate(reference_tokens.begin(), reference_tokens.end(),
11601 std::string{},
11602 [](const std::string& a, const std::string& b)
11603 {
11604 return a + "/" + escape(b);
11605 });
11606 }
11607
11608 /// @copydoc to_string()
11609 operator std::string() const

Callers

nothing calls this directly

Calls 3

escapeFunction · 0.85
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected