diff options
author | Brij Mohan Lal Srivastava <contactbrijmohan@gmail.com> | 2014-11-12 14:24:10 +0530 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-11-14 09:20:38 +0100 |
commit | d32be3ace8c8fd430bbecdf69f88a116b0ee91d1 (patch) | |
tree | b373c084cb124434e0498867b24bc7bb333155dd /include | |
parent | f5e86ebc097f0f8bc5b282511149cb026710ecde (diff) |
fdo#86023 - O[U]String needs a 'clear' method
Added clear() method to OString and OUString class, Updated appropriate call-sites.
Change-Id: I0ba97fa6dc7af3e31b605953089a4e8e9c3e61ac
Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/rtl/string.hxx | 10 | ||||
-rw-r--r-- | include/rtl/ustring.hxx | 9 |
2 files changed, 19 insertions, 0 deletions
diff --git a/include/rtl/string.hxx b/include/rtl/string.hxx index 9a163867c931..21cca1083914 100644 --- a/include/rtl/string.hxx +++ b/include/rtl/string.hxx @@ -316,6 +316,16 @@ public: return *this; } #endif + + /** + Clears the string, i.e, makes a zero-character string + @since LibreOffice 4.4 + */ + void clear() + { + rtl_string_new( &pData ); + } + /** Returns the length of this string. diff --git a/include/rtl/ustring.hxx b/include/rtl/ustring.hxx index 9815f9fe277e..b9a868b314a0 100644 --- a/include/rtl/ustring.hxx +++ b/include/rtl/ustring.hxx @@ -376,6 +376,15 @@ public: #endif /** + Clears the string, i.e, makes a zero-character string + @since LibreOffice 4.4 + */ + void clear() + { + rtl_uString_new( &pData ); + } + + /** Returns the length of this string. The length is equal to the number of Unicode characters in this string. |