Language

The Free and Open Productivity Suite
Released: Apache OpenOffice 4.1.15

API

SDK

Tips ‘n’ Tricks

Miscellaneous


Global Functions in Global Namespace C++
in Sourcefile ustrbuf.h


rtl_uStringbuffer_ensureCapacity
extern "C"
void rtl_uStringbuffer_ensureCapacity(
rtl_uString * * This,
sal_Int32 * capacity,
sal_Int32 minimumCapacity );

virtual abstract const volatile template static inline C-linkage
NO NO NO NO NO NO NO YES

Summary
Ensures that the capacity of the buffer is at least equal to the specified minimum.
Description
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:
  • The minimumCapacity argument.
  • Twice the old capacity, plus 2.
If the minimumCapacity argument is nonpositive, this method takes no action and simply returns.
Parameters
capacity
in: old capicity, out: new capacity.
minimumCapacity
the minimum desired capacity.

rtl_uStringbuffer_insert
extern "C"
void rtl_uStringbuffer_insert(
rtl_uString * * This,
sal_Int32 * capacity,
sal_Int32 offset,
const sal_Unicode * str,
sal_Int32 len );

virtual abstract const volatile template static inline C-linkage
NO NO NO NO NO NO NO YES

Summary
Inserts the string representation of the str array argument into this string buffer.
Description
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.
Parameters
This
The string, on that the operation should take place
capacity
the capacity of the string buffer
offset
the offset.
str
a character array.
len
the number of characters to append.

rtl_uStringbuffer_insertUtf32
extern "C"
void rtl_uStringbuffer_insertUtf32(
rtl_uString * * pThis,
sal_Int32 * capacity,
sal_Int32 offset,
sal_uInt32 c );

virtual abstract const volatile template static inline C-linkage
NO NO NO NO NO NO NO YES

Summary
Inserts a single UTF-32 character into this string buffer.
Description

The single UTF-32 character will be represented within the string buffer as either one or two UTF-16 code units.

Parameters
pThis
the string buffer on which the operation is performed

   
capacity
the capacity of the string buffer

   
offset
the offset into this string buffer (from zero to the length
   of this string buffer, inclusive)

   
c
a well-formed UTF-32 code unit (that is, a value in the range
   00x10FFFF, but excluding
   0xD8000xDFFF)
 

rtl_uStringbuffer_insert_ascii
extern "C"
void rtl_uStringbuffer_insert_ascii(
rtl_uString * * This,
sal_Int32 * capacity,
sal_Int32 offset,
const sal_Char * str,
sal_Int32 len );

virtual abstract const volatile template static inline C-linkage
NO NO NO NO NO NO NO YES

Summary
Inserts the 8-Bit ASCII string representation of the str array argument into this string buffer.
Description
Since this function is optimized for performance, the ASCII character values are not converted in any way. The caller has to make sure that all ASCII characters are in the allowed range between 0 and 127.

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.

Parameters
This
The string, on that the operation should take place
capacity
the capacity of the string buffer
offset
the offset.
str
a character array.
len
the number of characters to append.

rtl_uStringbuffer_newFromStr_WithLength
extern "C"
void rtl_uStringbuffer_newFromStr_WithLength(
rtl_uString * * newStr,
const sal_Unicode * value,
sal_Int32 count );

virtual abstract const volatile template static inline C-linkage
NO NO NO NO NO NO NO YES

Summary
Allocates a new String that contains characters from the character array argument.
Description
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.
Parameters
newStr
out parameter, contains the new string. The reference count is 1.
value
the initial value of the string.
count
the length of value.

rtl_uStringbuffer_newFromStringBuffer
extern "C"
sal_Int32 rtl_uStringbuffer_newFromStringBuffer(
rtl_uString * * newStr,
sal_Int32 capacity,
rtl_uString * olsStr );

virtual abstract const volatile template static inline C-linkage
NO NO NO NO NO NO NO YES

Summary
Allocates a new String that contains the same sequence of characters as the string argument.
Description
The initial capacity is the larger of:
  • The bufferLen argument.
  • The length of the string argument.
Parameters
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.
Return
the new capacity of the string buffer

Top of Page

Apache Software Foundation

Copyright & License | Privacy | Contact Us | Donate | Thanks

Apache, OpenOffice, OpenOffice.org and the seagull logo are registered trademarks of The Apache Software Foundation. The Apache feather logo is a trademark of The Apache Software Foundation. Other names appearing on the site may be trademarks of their respective owners.