* @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. */
| 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(); } |