SmallString: Add end_ptr()

This commit is contained in:
Stenzek 2023-09-17 20:16:06 +10:00 committed by Connor McLaughlin
parent 8a84d4812f
commit 824ef9a9d3
1 changed files with 3 additions and 0 deletions

View File

@ -171,6 +171,9 @@ public:
// gets a writable char array, do not write more than reserve characters to it. // gets a writable char array, do not write more than reserve characters to it.
__fi char* data() { return m_buffer; } __fi char* data() { return m_buffer; }
// returns the end of the string (pointer is past the last character)
__fi const char* end_ptr() const { return m_buffer + m_length; }
// STL adapters // STL adapters
__fi void push_back(value_type&& val) { append(val); } __fi void push_back(value_type&& val) { append(val); }