summaryrefslogtreecommitdiff
path: root/include/rtl/string.hxx
diff options
context:
space:
mode:
authorBrij Mohan Lal Srivastava <contactbrijmohan@gmail.com>2014-11-12 14:24:10 +0530
committerStephan Bergmann <sbergman@redhat.com>2014-11-14 09:20:38 +0100
commitd32be3ace8c8fd430bbecdf69f88a116b0ee91d1 (patch)
treeb373c084cb124434e0498867b24bc7bb333155dd /include/rtl/string.hxx
parentf5e86ebc097f0f8bc5b282511149cb026710ecde (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/rtl/string.hxx')
-rw-r--r--include/rtl/string.hxx10
1 files changed, 10 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.