summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/rtl/ustrbuf.hxx15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/rtl/ustrbuf.hxx b/include/rtl/ustrbuf.hxx
index f7d640c0e415..baf6daf014b8 100644
--- a/include/rtl/ustrbuf.hxx
+++ b/include/rtl/ustrbuf.hxx
@@ -384,6 +384,21 @@ public:
}
/**
+ Access to individual characters.
+
+ @param index must be non-negative and less than length.
+
+ @return a reference to the character at the given index.
+
+ @since LibreOffice 4.2
+ */
+ const sal_Unicode & operator [](sal_Int32 index) const
+ {
+ assert(index >= 0 && index < pData->length);
+ return pData->buffer[index];
+ }
+
+ /**
Return a OUString instance reflecting the current content
of this OUStringBuffer.
*/