summaryrefslogtreecommitdiff
path: root/include/rtl
diff options
context:
space:
mode:
Diffstat (limited to 'include/rtl')
-rw-r--r--include/rtl/string.hxx10
-rw-r--r--include/rtl/ustring.hxx9
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.