diff options
author | DukePyrolator <DukePyrolator@anope.org> | 2011-06-12 06:28:22 +0200 |
---|---|---|
committer | DukePyrolator <DukePyrolator@anope.org> | 2011-06-12 06:28:22 +0200 |
commit | 6148ffa66932e1d85a5f9a90298624da583ce5ed (patch) | |
tree | 13384c376c9e98543a1e6568a674c304720f7d81 | |
parent | 717b4c3406a8247561de8d36526bb7c32a7af4e7 (diff) |
added a Anope::string::capacity() function
-rw-r--r-- | include/anope.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/anope.h b/include/anope.h index 83f45d39b..1056c05ca 100644 --- a/include/anope.h +++ b/include/anope.h @@ -157,6 +157,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. */ inline void push_back(char c) { return this->_string.push_back(c); } |