diff options
author | Michael Meeks <michael.meeks@suse.com> | 2012-10-02 18:39:30 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@suse.com> | 2012-10-02 18:39:54 +0100 |
commit | 595ba03fd4769c069bbe0431ab878956ef1c37ad (patch) | |
tree | a0db9fe4e82e34b8606bc5be54d24df49a749e9a /sal/inc/rtl/ustring.h | |
parent | 2d25eea6949196d2275d8b2bd484e6dab0163a33 (diff) |
update string copy semantics to be undefined in a non-crashing way.
Change-Id: I03bb4db5931932280e368012cbaee6bef2854dd6
Diffstat (limited to 'sal/inc/rtl/ustring.h')
-rw-r--r-- | sal/inc/rtl/ustring.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/sal/inc/rtl/ustring.h b/sal/inc/rtl/ustring.h index 5b4982ec1461..231dcdce253a 100644 --- a/sal/inc/rtl/ustring.h +++ b/sal/inc/rtl/ustring.h @@ -1226,6 +1226,23 @@ SAL_DLLPUBLIC void SAL_CALL rtl_uString_newFromStr( SAL_DLLPUBLIC void SAL_CALL rtl_uString_newFromStr_WithLength( rtl_uString ** newStr, const sal_Unicode * value, sal_Int32 len ) SAL_THROW_EXTERN_C(); +/** Allocate a new string that is a substring of this string. + + The substring begins at the specified beginIndex and contains count + characters. Meaningless combinations such as negative beginIndex, + or beginIndex + count greater than the length of the string have + undefined behaviour. + + @param beginIndex the beginning index, inclusive. + @param count the number of characters. + @return the specified substring. + + @since LibreOffice 3.7 + */ +SAL_DLLPUBLIC void SAL_CALL rtl_uString_newFromSubString( + rtl_uString ** newStr, const rtl_uString * from, + sal_Int32 beginIndex, sal_Int32 count ) SAL_THROW_EXTERN_C(); + /** Allocate a new string that contains a copy of a character array. If the length of value is greater than zero, the reference count of the |