summaryrefslogtreecommitdiff
path: root/sal/inc/rtl/ustring.h
diff options
context:
space:
mode:
Diffstat (limited to 'sal/inc/rtl/ustring.h')
-rw-r--r--sal/inc/rtl/ustring.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/sal/inc/rtl/ustring.h b/sal/inc/rtl/ustring.h
index 0352e59b0e33..0548033f732c 100644
--- a/sal/inc/rtl/ustring.h
+++ b/sal/inc/rtl/ustring.h
@@ -1926,6 +1926,24 @@ SAL_DLLPUBLIC sal_Bool SAL_CALL rtl_convertStringToUString(
rtl_uString ** target, char const * source, sal_Int32 length,
rtl_TextEncoding encoding, sal_uInt32 flags) SAL_THROW_EXTERN_C();
+/** Ensure a string has enough space for a given number of characters.
+
+ If the given string is large enough and has refcount of 1, it is not altered in any way.
+ Otherwise it is replaced by a copy that has enough space for the given number of characters,
+ data from the source string is copied to the beginning of it, the content of the remaining
+ capacity undefined, the string has refcount of 1, and refcount of the original string is decreased.
+
+ @param str
+ pointer to the string. The pointed-to data must be a valid string.
+
+ @param size
+ the number of characters
+
+ @since LibreOffice 4.1
+ @internal
+ */
+SAL_DLLPUBLIC void SAL_CALL rtl_uString_ensureCapacity( rtl_uString ** str, sal_Int32 size ) SAL_THROW_EXTERN_C();
+
#ifdef __cplusplus
}
#endif