diff options
Diffstat (limited to 'common/str.cpp')
-rw-r--r-- | common/str.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/common/str.cpp b/common/str.cpp index 416b4d828f..0d2d3613f5 100644 --- a/common/str.cpp +++ b/common/str.cpp @@ -140,6 +140,10 @@ String &String::operator += (char c) { return *this; } +char lastChar() const { + return (_len > 0) ? _str[_len-1] : 0; +} + void String::deleteLastChar() { if (_len > 0) { ensureCapacity(_len - 1, true); |