From 6148ffa66932e1d85a5f9a90298624da583ce5ed Mon Sep 17 00:00:00 2001 From: DukePyrolator Date: Sun, 12 Jun 2011 06:28:22 +0200 Subject: [PATCH] added a Anope::string::capacity() function --- include/anope.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/anope.h b/include/anope.h index 83f45d39b..1056c05ca 100644 --- a/include/anope.h +++ b/include/anope.h @@ -156,6 +156,12 @@ namespace Anope */ inline size_type length() const { return this->_string.length(); } + /** + * Returns the size of the currently allocated storage space in the string object. + * This can be equal or greater than the length of the string. + */ + inline size_type capacity() const { return this->_string.capacity(); } + /** * Add a char to the end of the string. */