Compartilhar via


StringBuffer.Append Method

Definition

Overloads

Append(String, Int32, Int32)
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 StringBuffer to this sequence.

Append(Object)

Adds the string representation of the specified object to the end of this StringBuffer.

Append(ICharSequence)

Appends the specified CharSequence to this sequence.

Append(String, Int32, Int32)

public Java.Lang.IAppendable Append (string s, int start, int end);
override this.Append : string * int * int -> Java.Lang.IAppendable

Parameters

s
String
start
Int32
end
Int32

Returns

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[]
offset
Int32
len
Int32

Returns

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

s
ICharSequence

the CharSequence to append.

start
Int32

the inclusive start index.

end
Int32

the exclusive end index.

Returns

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

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

Returns

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

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

Returns

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[]

Returns

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

Returns

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

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

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

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

s
ICharSequence

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.

Applies to