X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6df09f32fd0bbc2324a6a96683109e6c6cc47db5..5b88a837ba75928cd3835a6b97ae2bf5ad983a6e:/interface/wx/buffer.h diff --git a/interface/wx/buffer.h b/interface/wx/buffer.h index 3d5287b6c7..b6052f47d9 100644 --- a/interface/wx/buffer.h +++ b/interface/wx/buffer.h @@ -200,8 +200,27 @@ public: Can only be called on buffers that don't share data with another buffer (i.e. reference count of the data is 1). + + @see shrink() */ bool extend(size_t len); + + /** + Shrinks the buffer to have size @a len and NUL-terminates the string + at this length. + + Can only be called on buffers that don't share data with another + buffer (i.e. reference count of the data is 1). + + @param len Length to shrink to. Must not be larger than current length. + + @note The string is not reallocated to take less memory. + + @since 2.9.0 + + @see extend() + */ + bool shrink(size_t len); }; /**