| Overview | Namespace | Class | Index | Help | 
Methods of Class OUStringBuffer
- OUStringBuffer
- OUStringBuffer();
 
 
- virtual - abstract - const - volatile - template - static - inline - C-linkage - NO - NO - NO - NO - NO - NO - YES - NO 
 
- Summary
- Constructs a string buffer with no characters in it and an initial capacity of 16 characters.
 
- OUStringBuffer
- OUStringBuffer(
- const OUStringBuffer & - value ); 
 
 
- virtual - abstract - const - volatile - template - static - inline - C-linkage - NO - NO - NO - NO - NO - NO - YES - NO 
 
- Summary
- Allocates a new string buffer that contains the same sequence of characters as the string buffer argument.
- Parameters
- value - a - OStringBuffer.
 
- OUStringBuffer
- OUStringBuffer(
- sal_Int32 - length ); 
 
 
- virtual - abstract - const - volatile - template - static - inline - C-linkage - NO - NO - NO - NO - NO - NO - YES - NO 
 
- Summary
- Constructs a string buffer with no characters in it and an
initial capacity specified by the lengthargument.
- Parameters
- length - the initial capacity. 
 
- OUStringBuffer
- OUStringBuffer(
- OUString - value ); 
 
 
- virtual - abstract - const - volatile - template - static - inline - C-linkage - NO - NO - NO - NO - NO - NO - YES - NO 
 
- Summary
- Constructs a string buffer so that it represents the same sequence of characters as the string argument.
- Description
- The initial
capacity of the string buffer is 16plus the length of the string argument.
- Parameters
- str - the initial contents of the buffer. 
 
- operator=
- OUStringBuffer & operator=(
- const OUStringBuffer & - value ); 
 
 
- virtual - abstract - const - volatile - template - static - inline - C-linkage - NO - NO - NO - NO - NO - NO - YES - NO 
 
- Summary
- Assign to this a copy of value.
 
- ~OUStringBuffer
- ~OUStringBuffer();
 
 
- virtual - abstract - const - volatile - template - static - inline - C-linkage - NO - NO - NO - NO - NO - NO - YES - NO 
 
- Summary
- Release the string data.
 
- makeStringAndClear
- OUString makeStringAndClear();
 
 
- virtual - abstract - const - volatile - template - static - inline - C-linkage - NO - NO - NO - NO - NO - NO - YES - NO 
 
- Summary
- Fill the string data in the new string and clear the buffer.
- Description
- This method is more efficient than the contructor of the string. It does not copy the buffer.
- Return
- the string previously contained in the buffer.
 
- getLength
- sal_Int32 getLength();
 
 
- virtual - abstract - const - volatile - template - static - inline - C-linkage - NO - NO - NO - NO - NO - NO - YES - NO 
 
- Summary
- Returns the length (character count) of this string buffer.
- Return
- the number of characters in this string buffer.
 
- getCapacity
- sal_Int32 getCapacity();
 
 
- virtual - abstract - const - volatile - template - static - inline - C-linkage - NO - NO - NO - NO - NO - NO - YES - NO 
 
- Summary
- Returns the current capacity of the String buffer.
- Description
- The capacity is the amount of storage available for newly inserted characters. The real buffer size is 2 bytes longer, because all strings are 0 terminated.
- Return
- the current capacity of this string buffer.
 
- ensureCapacity
- void ensureCapacity(
- sal_Int32 - minimumCapacity ); 
 
 
- virtual - abstract - const - volatile - template - static - inline - C-linkage - NO - NO - NO - NO - NO - NO - YES - NO 
 
- 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 minimumCapacityargument.
- Twice the old capacity, plus 2.
 minimumCapacityargument is nonpositive, this method takes no action and simply returns.
- The 
- Parameters
- minimumCapacity - the minimum desired capacity. 
 
- setLength
- void setLength(
- sal_Int32 - newLength ); 
 
 
- virtual - abstract - const - volatile - template - static - inline - C-linkage - NO - NO - NO - NO - NO - NO - YES - NO 
 
- Summary
- Sets the length of this String buffer.
- Description
-         If the newLengthargument is less than the current length of the string buffer, the string buffer is truncated to contain exactly the number of characters given by thenewLengthargument.If the newLengthargument is greater than or equal to the current length, sufficient null characters ('\u0000') are appended to the string buffer so that length becomes thenewLengthargument.The newLengthargument must be greater than or equal to0.
- Parameters
- newLength - the new length of the buffer.
 
- charAt
- sal_Unicode charAt(
- sal_Int32 - index ); 
 
 
- virtual - abstract - const - volatile - template - static - inline - C-linkage - NO - NO - NO - NO - NO - NO - YES - NO 
 
- Summary
- Returns the character at a specific index in this string buffer.
- Description
-         The first character of a string buffer is at index
        0, the next at index1, and so on, for array indexing.The index argument must be greater than or equal to 0, and less than the length of this string buffer.
- Parameters
- index - the index of the desired character.
- Return
- the character at the specified index of this string buffer.
 
- operator const sal_Unicode *
- operator const sal_Unicode *();
 
 
- virtual - abstract - const - volatile - template - static - inline - C-linkage - NO - NO - NO - NO - NO - NO - YES - NO 
 
- Summary
- Return a null terminated unicode character array.
 
- getStr
- const sal_Unicode * getStr();
 
 
- virtual - abstract - const - volatile - template - static - inline - C-linkage - NO - NO - NO - NO - NO - NO - YES - NO 
 
- Summary
- Return a null terminated unicode character array.
 
- setCharAt
- OUStringBuffer & setCharAt(
- sal_Int32 - index, - sal_Unicode - ch ); 
 
 
- virtual - abstract - const - volatile - template - static - inline - C-linkage - NO - NO - NO - NO - NO - NO - YES - NO 
 
- Summary
- The character at the specified index of this string buffer is set
to ch.
- Description
- The offset argument must be greater than or equal to
0, and less than the length of this string buffer.
- Parameters
- index - the index of the character to modify. - ch - the new character. 
 
- append
- OUStringBuffer & append(
- const OUString & - str ); 
 
 
- virtual - abstract - const - volatile - template - static - inline - C-linkage - NO - NO - NO - NO - NO - NO - YES - NO 
 
- Summary
- Appends the string to this string buffer.
- Description
-         The characters of the Stringargument are appended, in order, to the contents of this string buffer, increasing the length of this string buffer by the length of the argument.
- Parameters
- str - a string.
- Return
- this string buffer.
 
- append
- OUStringBuffer & append(
- const sal_Unicode * - str ); 
 
 
- virtual - abstract - const - volatile - template - static - inline - C-linkage - NO - NO - NO - NO - NO - NO - YES - NO 
 
- Summary
- Appends the string representation of the chararray argument to this string buffer.
- Description
- The characters of the array argument are appended, in order, to the contents of this string buffer. The length of this string buffer increases by the length of the argument.
- Parameters
- str - the characters to be appended. 
- Return
- this string buffer.
 
- append
- OUStringBuffer & append(
- const sal_Unicode * - str, - sal_Int32 - len ); 
 
 
- virtual - abstract - const - volatile - template - static - inline - C-linkage - NO - NO - NO - NO - NO - NO - YES - NO 
 
- Summary
- Appends the string representation of the chararray argument to this string buffer.
- Description
- Characters of the character array strare appended, in order, to the contents of this string buffer. The length of this string buffer increases by the value oflen.
- Parameters
- str - the characters to be appended. - len - the number of characters to append. 
- Return
- this string buffer.
 
- appendAscii
- OUStringBuffer & appendAscii(
- const sal_Char * - str ); 
 
 
- virtual - abstract - const - volatile - template - static - inline - C-linkage - NO - NO - NO - NO - NO - NO - YES - NO 
 
- Summary
- Appends a 8-Bit ASCII character string to this string buffer.
- Description
-       Since this method 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 ASCII string must be
       NULL-terminated.
       The characters of the array argument are appended, in order, to the contents of this string buffer. The length of this string buffer increases by the length of the argument. 
- Parameters
- str - the 8-Bit ASCII characters to be appended.
- Return
- this string buffer.
 
- appendAscii
- OUStringBuffer & appendAscii(
- const sal_Char * - str, - sal_Int32 - len ); 
 
 
- virtual - abstract - const - volatile - template - static - inline - C-linkage - NO - NO - NO - NO - NO - NO - YES - NO 
 
- Summary
- Appends a 8-Bit ASCII character string to this string buffer.
- Description
-         Since this method 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 ASCII string must be
        NULL-terminated.
        Characters of the character array strare appended, in order, to the contents of this string buffer. The length of this string buffer increases by the value oflen.
- Parameters
- str - the 8-Bit ASCII characters to be appended.- len - the number of characters to append.
- Return
- this string buffer.
 
- append
- OUStringBuffer & append(
- sal_Bool - b ); 
 
 
- virtual - abstract - const - volatile - template - static - inline - C-linkage - NO - NO - NO - NO - NO - NO - YES - NO 
 
- Summary
- Appends the string representation of the sal_Boolargument to the string buffer.
- Description
- The argument is converted to a string as if by the method
String.valueOf, and the characters of that string are then appended to this string buffer.
- Parameters
- b - a - sal_Bool.
- Return
- this string buffer.
 
- append
- OUStringBuffer & append(
- sal_Unicode - c ); 
 
 
- virtual - abstract - const - volatile - template - static - inline - C-linkage - NO - NO - NO - NO - NO - NO - YES - NO 
 
- Summary
- Appends the string representation of the charargument to this string buffer.
- Description
- The argument is appended to the contents of this string buffer.
The length of this string buffer increases by 1.
- Parameters
- ch - a - char.
- Return
- this string buffer.
 
- append
- OUStringBuffer & append(
- sal_Int32 - i, - sal_Int16 - radix = 10 ); 
 
 
- virtual - abstract - const - volatile - template - static - inline - C-linkage - NO - NO - NO - NO - NO - NO - YES - NO 
 
- Summary
- Appends the string representation of the sal_Int32argument to this string buffer.
- Description
- The argument is converted to a string as if by the method
String.valueOf, and the characters of that string are then appended to this string buffer.
- Parameters
- i - an - sal_Int32.
- Return
- this string buffer.
 
- append
- OUStringBuffer & append(
- sal_Int64 - l, - sal_Int16 - radix = 10 ); 
 
 
- virtual - abstract - const - volatile - template - static - inline - C-linkage - NO - NO - NO - NO - NO - NO - YES - NO 
 
- Summary
- Appends the string representation of the longargument to this string buffer.
- Description
- The argument is converted to a string as if by the method
String.valueOf, and the characters of that string are then appended to this string buffer.
- Parameters
- l - a - long.
- Return
- this string buffer.
 
- append
- OUStringBuffer & append(
- float - f ); 
 
 
- virtual - abstract - const - volatile - template - static - inline - C-linkage - NO - NO - NO - NO - NO - NO - YES - NO 
 
- Summary
- Appends the string representation of the floatargument to this string buffer.
- Description
- The argument is converted to a string as if by the method
String.valueOf, and the characters of that string are then appended to this string buffer.
- Parameters
- f - a - float.
- Return
- this string buffer.
 
- append
- OUStringBuffer & append(
- double - d ); 
 
 
- virtual - abstract - const - volatile - template - static - inline - C-linkage - NO - NO - NO - NO - NO - NO - YES - NO 
 
- Summary
- Appends the string representation of the doubleargument to this string buffer.
- Description
- The argument is converted to a string as if by the method
String.valueOf, and the characters of that string are then appended to this string buffer.
- Parameters
- d - a - double.
- Return
- this string buffer.
 
- insert
- OUStringBuffer & insert(
- sal_Int32 - offset, - const OUString & - str ); 
 
 
- virtual - abstract - const - volatile - template - static - inline - C-linkage - NO - NO - NO - NO - NO - NO - YES - NO 
 
- Summary
- Inserts the string into this string buffer.
- Description
-         The characters of the Stringargument are inserted, in order, into this string buffer at the indicated offset. The length of this string buffer is increased by the length of the argument.The offset argument must be greater than or equal to 0, and less than or equal to the length of this string buffer.
- Parameters
- offset - the offset.- str - a string.
- Return
- this string buffer.
 
- insert
- OUStringBuffer & insert(
- sal_Int32 - offset, - const sal_Unicode * - str ); 
 
 
- virtual - abstract - const - volatile - template - static - inline - C-linkage - NO - NO - NO - NO - NO - NO - YES - NO 
 
- Summary
- Inserts the string representation of the chararray 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
- offset - the offset. - ch - a character array. 
- Return
- this string buffer.
 
- insert
- OUStringBuffer & insert(
- 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 - YES - NO 
 
- Summary
- Inserts the string representation of the chararray 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
- offset - the offset. - ch - a character array. - len - the number of characters to append. 
- Return
- this string buffer.
 
- insert
- OUStringBuffer & insert(
- sal_Int32 - offset, - sal_Bool - b ); 
 
 
- virtual - abstract - const - volatile - template - static - inline - C-linkage - NO - NO - NO - NO - NO - NO - YES - NO 
 
- Summary
- Inserts the string representation of the sal_Boolargument into this string buffer.
- Description
- The second argument is converted to a string as if by the method
String.valueOf, and the characters of that string are then inserted into this string buffer at the indicated offset.The offset argument must be greater than or equal to 0, and less than or equal to the length of this string buffer.
- Parameters
- offset - the offset. - b - a - sal_Bool.
- Return
- this string buffer.
 
- insert
- OUStringBuffer & insert(
- sal_Int32 - offset, - sal_Unicode - c ); 
 
 
- virtual - abstract - const - volatile - template - static - inline - C-linkage - NO - NO - NO - NO - NO - NO - YES - NO 
 
- Summary
- Inserts the string representation of the charargument into this string buffer.
- Description
- The second argument is inserted into the contents of this string
buffer at the position indicated by offset. The length of this string buffer increases by one.The offset argument must be greater than or equal to 0, and less than or equal to the length of this string buffer.
- Parameters
- offset - the offset. - ch - a - char.
- Return
- this string buffer.
 
- insert
- OUStringBuffer & insert(
- sal_Int32 - offset, - sal_Int32 - i, - sal_Int16 - radix = 10 ); 
 
 
- virtual - abstract - const - volatile - template - static - inline - C-linkage - NO - NO - NO - NO - NO - NO - YES - NO 
 
- Summary
- Inserts the string representation of the second sal_Int32argument into this string buffer.
- Description
- The second argument is converted to a string as if by the method
String.valueOf, and the characters of that string are then inserted into this string buffer at the indicated offset.The offset argument must be greater than or equal to 0, and less than or equal to the length of this string buffer.
- Parameters
- offset - the offset. - b - an - sal_Int32.
- Return
- this string buffer.
 
- insert
- OUStringBuffer & insert(
- sal_Int32 - offset, - sal_Int64 - l, - sal_Int16 - radix = 10 ); 
 
 
- virtual - abstract - const - volatile - template - static - inline - C-linkage - NO - NO - NO - NO - NO - NO - YES - NO 
 
- Summary
- Inserts the string representation of the longargument into this string buffer.
- Description
- The second argument is converted to a string as if by the method
String.valueOf, and the characters of that string are then inserted into this string buffer at the indicated offset.The offset argument must be greater than or equal to 0, and less than or equal to the length of this string buffer.
- Parameters
- offset - the offset. - b - a - long.
- Return
- this string buffer.
 
- insert
- OUStringBuffer insert(
- sal_Int32 - offset, - float - f ); 
 
 
- virtual - abstract - const - volatile - template - static - inline - C-linkage - NO - NO - NO - NO - NO - NO - YES - NO 
 
- Summary
- Inserts the string representation of the floatargument into this string buffer.
- Description
- The second argument is converted to a string as if by the method
String.valueOf, and the characters of that string are then inserted into this string buffer at the indicated offset.The offset argument must be greater than or equal to 0, and less than or equal to the length of this string buffer.
- Parameters
- offset - the offset. - b - a - float.
- Return
- this string buffer.
 
- insert
- OUStringBuffer & insert(
- sal_Int32 - offset, - double - d ); 
 
 
- virtual - abstract - const - volatile - template - static - inline - C-linkage - NO - NO - NO - NO - NO - NO - YES - NO 
 
- Summary
- Inserts the string representation of the doubleargument into this string buffer.
- Description
- The second argument is converted to a string as if by the method
String.valueOf, and the characters of that string are then inserted into this string buffer at the indicated offset.The offset argument must be greater than or equal to 0, and less than or equal to the length of this string buffer.
- Parameters
- offset - the offset. - b - a - double.
- Return
- this string buffer.
 
Top of Page
Copyright 2002 Sun Microsystems, Inc., 901 San Antonio Road, Palo Alto, CA 94303 USA.

