StringBuffer.Append Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| Name | Description |
|---|---|
| Append(String, Int32, Int32) |
Appends the specified value to this character sequence. |
| Append(Char[], Int32, Int32) |
Adds the specified sequence of characters to the end of this buffer. |
| Append(ICharSequence, Int32, Int32) |
Added in 1. |
| Append(Single) |
Adds the string representation of the specified float to the end of this StringBuffer. |
| Append(Int64) |
Adds the string representation of the specified long to the end of this StringBuffer. |
| Append(Int32) |
Adds the string representation of the specified integer to the end of this StringBuffer. |
| Append(String) |
Adds the specified string to the end of this buffer. |
| Append(Char[]) |
Adds the character array to the end of this buffer. |
| Append(Char) |
Adds the specified character to the end of this buffer. |
| Append(Boolean) |
Adds the string representation of the specified boolean to the end of this StringBuffer. |
| Append(Double) |
Adds the string representation of the specified double to the end of this StringBuffer. |
| Append(StringBuffer) |
Appends the specified |
| Append(Object) |
Adds the string representation of the specified object to the end of this StringBuffer. |
| Append(ICharSequence) |
Appends the specified |
Append(String, Int32, Int32)
Appends the specified value to this character sequence.
public Java.Lang.IAppendable Append(string s, int start, int end);
override this.Append : string * int * int -> Java.Lang.IAppendable
Parameters
- s
- String
The character sequence to append.
- start
- Int32
The inclusive start index of the range.
- end
- Int32
The exclusive end index of the range.
Returns
This character sequence after the append operation.
Remarks
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Applies to
Append(Char[], Int32, Int32)
Adds the specified sequence of characters to the end of this buffer.
[Android.Runtime.Register("append", "([CII)Ljava/lang/StringBuffer;", "")]
public Java.Lang.IAppendable Append(char[]? str, int offset, int len);
[<Android.Runtime.Register("append", "([CII)Ljava/lang/StringBuffer;", "")>]
override this.Append : char[] * int * int -> Java.Lang.IAppendable
Parameters
- str
- Char[]
The string to append.
- offset
- Int32
The offset at which the operation is performed.
- len
- Int32
The number of elements to process.
Returns
This character sequence after the append operation.
- Attributes
Exceptions
if length , start or start +
length > chars.length.
if chars is null.
Remarks
Java documentation for java.lang.StringBuffer.append(char[], int, int).
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Applies to
Append(ICharSequence, Int32, Int32)
Added in 1.
[Android.Runtime.Register("append", "(Ljava/lang/CharSequence;II)Ljava/lang/StringBuffer;", "")]
public override Java.Lang.IAppendable Append(Java.Lang.ICharSequence? s, int start, int end);
[<Android.Runtime.Register("append", "(Ljava/lang/CharSequence;II)Ljava/lang/StringBuffer;", "")>]
override this.Append : Java.Lang.ICharSequence * int * int -> Java.Lang.IAppendable
Parameters
the CharSequence to append.
- start
- Int32
the inclusive start index.
- end
- Int32
the exclusive end index.
Returns
This character sequence after the append operation.
Implements
- Attributes
Exceptions
if start or end are negative, start
is greater than end or end is greater than
the length of s.
Remarks
Added in 1.5.
Java documentation for java.lang.StringBuffer.append(java.lang.CharSequence, int, int).
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Applies to
Append(Single)
Adds the string representation of the specified float to the end of this StringBuffer.
[Android.Runtime.Register("append", "(F)Ljava/lang/StringBuffer;", "")]
public Java.Lang.IAppendable Append(float f);
[<Android.Runtime.Register("append", "(F)Ljava/lang/StringBuffer;", "")>]
override this.Append : single -> Java.Lang.IAppendable
Parameters
- f
- Single
the float to append.
Returns
This character sequence after the append operation.
- Attributes
Remarks
Java documentation for java.lang.StringBuffer.append(java.lang.AbstractStringBuilder).
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
See also
Applies to
Append(Int64)
Adds the string representation of the specified long to the end of this StringBuffer.
[Android.Runtime.Register("append", "(J)Ljava/lang/StringBuffer;", "")]
public Java.Lang.IAppendable Append(long lng);
[<Android.Runtime.Register("append", "(J)Ljava/lang/StringBuffer;", "")>]
override this.Append : int64 -> Java.Lang.IAppendable
Parameters
- lng
- Int64
The 64-bit integer value to append.
Returns
This character sequence after the append operation.
- Attributes
Remarks
Java documentation for java.lang.StringBuffer.append(java.lang.AbstractStringBuilder).
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
See also
Applies to
Append(Int32)
Adds the string representation of the specified integer to the end of this StringBuffer.
[Android.Runtime.Register("append", "(I)Ljava/lang/StringBuffer;", "")]
public Java.Lang.IAppendable Append(int i);
[<Android.Runtime.Register("append", "(I)Ljava/lang/StringBuffer;", "")>]
override this.Append : int -> Java.Lang.IAppendable
Parameters
- i
- Int32
the integer to append.
Returns
This character sequence after the append operation.
- Attributes
Remarks
Java documentation for java.lang.StringBuffer.append(java.lang.AbstractStringBuilder).
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
See also
Applies to
Append(String)
Adds the specified string to the end of this buffer.
[Android.Runtime.Register("append", "(Ljava/lang/String;)Ljava/lang/StringBuffer;", "")]
public Java.Lang.IAppendable Append(string? str);
[<Android.Runtime.Register("append", "(Ljava/lang/String;)Ljava/lang/StringBuffer;", "")>]
override this.Append : string -> Java.Lang.IAppendable
Parameters
- str
- String
The string to append.
Returns
This character sequence after the append operation.
- Attributes
Remarks
Java documentation for java.lang.StringBuffer.append(java.lang.AbstractStringBuilder).
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Applies to
Append(Char[])
Adds the character array to the end of this buffer.
[Android.Runtime.Register("append", "([C)Ljava/lang/StringBuffer;", "")]
public Java.Lang.IAppendable Append(char[]? str);
[<Android.Runtime.Register("append", "([C)Ljava/lang/StringBuffer;", "")>]
override this.Append : char[] -> Java.Lang.IAppendable
Parameters
- str
- Char[]
The string to append.
Returns
This character sequence after the append operation.
- Attributes
Exceptions
if chars is null.
Remarks
Java documentation for java.lang.StringBuffer.append(java.lang.AbstractStringBuilder).
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Applies to
Append(Char)
Adds the specified character to the end of this buffer.
[Android.Runtime.Register("append", "(C)Ljava/lang/StringBuffer;", "")]
public override Java.Lang.IAppendable Append(char c);
[<Android.Runtime.Register("append", "(C)Ljava/lang/StringBuffer;", "")>]
override this.Append : char -> Java.Lang.IAppendable
Parameters
- c
- Char
The character to append.
Returns
This character sequence after the append operation.
Implements
- Attributes
Remarks
Java documentation for java.lang.StringBuffer.append(java.lang.AbstractStringBuilder).
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
See also
Applies to
Append(Boolean)
Adds the string representation of the specified boolean to the end of this StringBuffer.
[Android.Runtime.Register("append", "(Z)Ljava/lang/StringBuffer;", "")]
public Java.Lang.IAppendable Append(bool b);
[<Android.Runtime.Register("append", "(Z)Ljava/lang/StringBuffer;", "")>]
override this.Append : bool -> Java.Lang.IAppendable
Parameters
- b
- Boolean
the boolean to append.
Returns
This character sequence after the append operation.
- Attributes
Remarks
Java documentation for java.lang.StringBuffer.append(java.lang.AbstractStringBuilder).
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
See also
Applies to
Append(Double)
Adds the string representation of the specified double to the end of this StringBuffer.
[Android.Runtime.Register("append", "(D)Ljava/lang/StringBuffer;", "")]
public Java.Lang.IAppendable Append(double d);
[<Android.Runtime.Register("append", "(D)Ljava/lang/StringBuffer;", "")>]
override this.Append : double -> Java.Lang.IAppendable
Parameters
- d
- Double
the double to append.
Returns
This character sequence after the append operation.
- Attributes
Remarks
Java documentation for java.lang.StringBuffer.append(java.lang.AbstractStringBuilder).
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
See also
Applies to
Append(StringBuffer)
Appends the specified StringBuffer to this sequence.
[Android.Runtime.Register("append", "(Ljava/lang/StringBuffer;)Ljava/lang/StringBuffer;", "")]
public Java.Lang.IAppendable Append(Java.Lang.StringBuffer? sb);
[<Android.Runtime.Register("append", "(Ljava/lang/StringBuffer;)Ljava/lang/StringBuffer;", "")>]
override this.Append : Java.Lang.StringBuffer -> Java.Lang.IAppendable
Parameters
- sb
- StringBuffer
the StringBuffer to append.
Returns
a reference to this object.
- Attributes
Remarks
Appends the specified StringBuffer to this sequence.
The characters of the StringBuffer argument are appended, in order, to the contents of this StringBuffer, increasing the length of this StringBuffer by the length of the argument. If sb is null, then the four characters "null" are appended to this StringBuffer.
Let n be the length of the old character sequence, the one contained in the StringBuffer just prior to execution of the append method. Then the character at index k in the new character sequence is equal to the character at index k in the old character sequence, if k is less than n; otherwise, it is equal to the character at index k-n in the argument sb.
This method synchronizes on this, the destination object, but does not synchronize on the source (sb).
Added in 1.4.
Java documentation for java.lang.StringBuffer.append(java.lang.StringBuffer).
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Applies to
Append(Object)
Adds the string representation of the specified object to the end of this StringBuffer.
[Android.Runtime.Register("append", "(Ljava/lang/Object;)Ljava/lang/StringBuffer;", "")]
public Java.Lang.IAppendable Append(Java.Lang.Object? obj);
[<Android.Runtime.Register("append", "(Ljava/lang/Object;)Ljava/lang/StringBuffer;", "")>]
override this.Append : Java.Lang.Object -> Java.Lang.IAppendable
Parameters
- obj
- Object
the object to append (may be null).
Returns
This character sequence after the append operation.
- Attributes
Remarks
Java documentation for java.lang.StringBuffer.append(java.lang.AbstractStringBuilder).
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
See also
Applies to
Append(ICharSequence)
Appends the specified CharSequence to this
sequence.
[Android.Runtime.Register("append", "(Ljava/lang/CharSequence;)Ljava/lang/StringBuffer;", "")]
public override Java.Lang.IAppendable Append(Java.Lang.ICharSequence? s);
[<Android.Runtime.Register("append", "(Ljava/lang/CharSequence;)Ljava/lang/StringBuffer;", "")>]
override this.Append : Java.Lang.ICharSequence -> Java.Lang.IAppendable
Parameters
the CharSequence to append.
Returns
a reference to this object.
Implements
- Attributes
Remarks
Appends the specified CharSequence to this sequence.
The characters of the CharSequence argument are appended, in order, increasing the length of this sequence by the length of the argument.
The result of this method is exactly the same as if it were an invocation of this.append(s, 0, s.length());
This method synchronizes on this, the destination object, but does not synchronize on the source (s).
If s is null, then the four characters "null" are appended.
Added in 1.5.
Java documentation for java.lang.StringBuffer.append(java.lang.CharSequence).
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.