LibreOffice
LibreOffice 24.2 SDK C/C++ API Reference
|
Go to the source code of this file.
Functions | |
SAL_DLLPUBLIC void | rtl_stringbuffer_newFromStr_WithLength (rtl_String **newStr, const char *value, sal_Int32 count) |
Allocates a new String that contains characters from the character array argument. More... | |
SAL_DLLPUBLIC sal_Int32 | rtl_stringbuffer_newFromStringBuffer (rtl_String **newStr, sal_Int32 capacity, rtl_String *oldStr) |
Allocates a new String that contains the same sequence of characters as the string argument. More... | |
SAL_DLLPUBLIC void | rtl_stringbuffer_ensureCapacity (rtl_String **This, sal_Int32 *capacity, sal_Int32 minimumCapacity) |
Ensures that the capacity of the buffer is at least equal to the specified minimum. More... | |
SAL_DLLPUBLIC void | rtl_stringbuffer_insert (rtl_String **This, sal_Int32 *capacity, sal_Int32 offset, const char *str, sal_Int32 len) |
Inserts the string representation of the char array argument into this string buffer. More... | |
SAL_DLLPUBLIC void | rtl_stringbuffer_remove (rtl_String **This, sal_Int32 start, sal_Int32 len) |
Removes the characters in a substring of this sequence. More... | |
SAL_DLLPUBLIC void rtl_stringbuffer_ensureCapacity | ( | rtl_String ** | This, |
sal_Int32 * | capacity, | ||
sal_Int32 | minimumCapacity | ||
) |
Ensures that the capacity of the buffer is at least equal to the specified minimum.
If the current capacity of this string buffer is less than the argument, then a new internal buffer is allocated with greater capacity. The new capacity is the larger of:
minimumCapacity
argument. 2
. If the minimumCapacity
argument is nonpositive, this method takes no action and simply returns.
[in,out] | This | the String to operate on. |
[in,out] | capacity | in: old capacity, out: new capacity. |
[in] | minimumCapacity | the minimum desired capacity. |
SAL_DLLPUBLIC void rtl_stringbuffer_insert | ( | rtl_String ** | This, |
sal_Int32 * | capacity, | ||
sal_Int32 | offset, | ||
const char * | str, | ||
sal_Int32 | len | ||
) |
Inserts the string representation of the char
array argument into this string buffer.
The characters of the array argument are inserted into the contents of this string buffer at the position indicated by offset
. The length of this string buffer increases by the length of the argument.
[in,out] | This | the String to operate on. |
[in,out] | capacity | the capacity of the string buffer |
[in] | offset | the offset. |
[in] | str | a character array. Since LibreOffice 4.4, as a special case, if str is null then the len added characters are left uninitialized. |
[in] | len | the number of characters to append. |
SAL_DLLPUBLIC void rtl_stringbuffer_newFromStr_WithLength | ( | rtl_String ** | newStr, |
const char * | value, | ||
sal_Int32 | count | ||
) |
Allocates a new String
that contains characters from the character array argument.
The count
argument specifies the length of the array. The initial capacity of the string buffer is 16
plus the length of the string argument.
newStr | out parameter, contains the new string. The reference count is 1. |
value | the initial value of the string. |
count | the length of value. |
SAL_DLLPUBLIC sal_Int32 rtl_stringbuffer_newFromStringBuffer | ( | rtl_String ** | newStr, |
sal_Int32 | capacity, | ||
rtl_String * | oldStr | ||
) |
Allocates a new String
that contains the same sequence of characters as the string argument.
The initial capacity is the larger of:
bufferLen
argument. length
of the string argument. newStr | out parameter, contains the new string. The reference count is 1. |
capacity | the initial len of the string buffer. |
oldStr | the initial value of the string. |
SAL_DLLPUBLIC void rtl_stringbuffer_remove | ( | rtl_String ** | This, |
sal_Int32 | start, | ||
sal_Int32 | len | ||
) |
Removes the characters in a substring of this sequence.
The substring begins at the specified start
and is len
characters long.
start must be >= 0 && <= This->length
[in,out] | This | The String to operate on. |
[in] | start | The beginning index, inclusive |
[in] | len | The substring length |