MCPcopy Create free account
hub / github.com/bytedance/sonic-cpp / ToString

Method ToString

include/sonic/writebuffer.h:44–48  ·  view source on GitHub ↗

* @brief Return the context in the buffer. * @return a null-terminate string. * @note a '\0' will be added in the ending, so, this function is not * thread-safe. */

Source from the content-addressed store, hash-verified

42 * thread-safe.
43 */
44 sonic_force_inline const char* ToString() const {
45 stack_.Grow(1);
46 *(stack_.template End<char>()) = '\0';
47 return stack_.Begin<char>();
48 }
49
50 sonic_force_inline size_t Size() const { return stack_.Size(); }
51 sonic_force_inline size_t Capacity() const { return stack_.Capacity(); }

Callers 6

mainFunction · 0.80
str_implMethod · 0.80
TYPED_TESTFunction · 0.80
TESTFunction · 0.80
DumpFunction · 0.80
UpdateLazyFunction · 0.80

Calls 1

GrowMethod · 0.45

Tested by 2

TYPED_TESTFunction · 0.64
TESTFunction · 0.64