From 824ef9a9d33b8383c7244d195c3bec093f5239e6 Mon Sep 17 00:00:00 2001 From: Stenzek Date: Sun, 17 Sep 2023 20:16:06 +1000 Subject: [PATCH] SmallString: Add end_ptr() --- common/SmallString.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/common/SmallString.h b/common/SmallString.h index b79e5c53c8..1366ed8c25 100644 --- a/common/SmallString.h +++ b/common/SmallString.h @@ -171,6 +171,9 @@ public: // gets a writable char array, do not write more than reserve characters to it. __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 __fi void push_back(value_type&& val) { append(val); }