StringBuilder.Append Method

Definition

Overloads

Name Description
Append(String, Int32, Int32)

Appends the specified value to this character sequence.

Append(Char[], Int32, Int32)

Appends the string representation of the specified subset of the char[].

Append(ICharSequence, Int32, Int32)

Appends the string representation of the specified subsequence of the CharSequence.

Append(Single)

Appends the string representation of the specified float value.

Append(Int64)

Appends the string representation of the specified long value.

Append(Int32)

Appends the string representation of the specified int value.

Append(String)

Appends the contents of the specified string.

Append(Char[])

Appends the string representation of the specified char[].

Append(Char)

Appends the string representation of the specified char value.

Append(Boolean)

Appends the string representation of the specified boolean value.

Append(Double)

Appends the string representation of the specified double value.

Append(StringBuffer)

Appends the specified StringBuffer to this sequence.

Append(Object)

Appends the string representation of the specified Object.

Append(ICharSequence)

Appends the string representation of the specified CharSequence.

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)

Appends the string representation of the specified subset of the char[].

[Android.Runtime.Register("append", "([CII)Ljava/lang/StringBuilder;", "")]
public Java.Lang.IAppendable Append(char[]? str, int offset, int len);
[<Android.Runtime.Register("append", "([CII)Ljava/lang/StringBuilder;", "")>]
override this.Append : char[] * int * int -> Java.Lang.IAppendable

Parameters

str
Char[]

the char[] to append.

offset
Int32

the inclusive offset index.

len
Int32

the number of characters.

Returns

This character sequence after the append operation.

Attributes

Exceptions

if offset and len do not specify a valid subsequence.

Remarks

Java documentation for java.lang.StringBuilder.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.

See also

  • <xref:Java.Lang.String.ValueOf(System.Char%5b%5d%2c+System.Int32%2c+System.Int32)>

Applies to

Append(ICharSequence, Int32, Int32)

Appends the string representation of the specified subsequence of the CharSequence.

[Android.Runtime.Register("append", "(Ljava/lang/CharSequence;II)Ljava/lang/StringBuilder;", "")]
public override Java.Lang.IAppendable Append(Java.Lang.ICharSequence? s, int start, int end);
[<Android.Runtime.Register("append", "(Ljava/lang/CharSequence;II)Ljava/lang/StringBuilder;", "")>]
override this.Append : Java.Lang.ICharSequence * int * int -> Java.Lang.IAppendable

Parameters

s
ICharSequence

The character sequence to append.

start
Int32

the beginning index.

end
Int32

the ending 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 csq.

Remarks

Java documentation for java.lang.StringBuilder.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)

Appends the string representation of the specified float value.

[Android.Runtime.Register("append", "(F)Ljava/lang/StringBuilder;", "")]
public Java.Lang.IAppendable Append(float f);
[<Android.Runtime.Register("append", "(F)Ljava/lang/StringBuilder;", "")>]
override this.Append : single -> Java.Lang.IAppendable

Parameters

f
Single

the float value to append.

Returns

This character sequence after the append operation.

Attributes

Remarks

Java documentation for java.lang.StringBuilder.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.

See also

Applies to

Append(Int64)

Appends the string representation of the specified long value.

[Android.Runtime.Register("append", "(J)Ljava/lang/StringBuilder;", "")]
public Java.Lang.IAppendable Append(long lng);
[<Android.Runtime.Register("append", "(J)Ljava/lang/StringBuilder;", "")>]
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.StringBuilder.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.

See also

Applies to

Append(Int32)

Appends the string representation of the specified int value.

[Android.Runtime.Register("append", "(I)Ljava/lang/StringBuilder;", "")]
public Java.Lang.IAppendable Append(int i);
[<Android.Runtime.Register("append", "(I)Ljava/lang/StringBuilder;", "")>]
override this.Append : int -> Java.Lang.IAppendable

Parameters

i
Int32

the int value to append.

Returns

This character sequence after the append operation.

Attributes

Remarks

Java documentation for java.lang.StringBuilder.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.

See also

Applies to

Append(String)

Appends the contents of the specified string.

[Android.Runtime.Register("append", "(Ljava/lang/String;)Ljava/lang/StringBuilder;", "")]
public Java.Lang.IAppendable Append(string? str);
[<Android.Runtime.Register("append", "(Ljava/lang/String;)Ljava/lang/StringBuilder;", "")>]
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.StringBuilder.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(Char[])

Appends the string representation of the specified char[].

[Android.Runtime.Register("append", "([C)Ljava/lang/StringBuilder;", "")]
public Java.Lang.IAppendable Append(char[]? str);
[<Android.Runtime.Register("append", "([C)Ljava/lang/StringBuilder;", "")>]
override this.Append : char[] -> Java.Lang.IAppendable

Parameters

str
Char[]

The string to append.

Returns

This character sequence after the append operation.

Attributes

Remarks

Java documentation for java.lang.StringBuilder.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.

See also

Applies to

Append(Char)

Appends the string representation of the specified char value.

[Android.Runtime.Register("append", "(C)Ljava/lang/StringBuilder;", "")]
public override Java.Lang.IAppendable Append(char c);
[<Android.Runtime.Register("append", "(C)Ljava/lang/StringBuilder;", "")>]
override this.Append : char -> Java.Lang.IAppendable

Parameters

c
Char

the char value to append.

Returns

This character sequence after the append operation.

Implements

Attributes

Remarks

Java documentation for java.lang.StringBuilder.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.

See also

Applies to

Append(Boolean)

Appends the string representation of the specified boolean value.

[Android.Runtime.Register("append", "(Z)Ljava/lang/StringBuilder;", "")]
public Java.Lang.IAppendable Append(bool b);
[<Android.Runtime.Register("append", "(Z)Ljava/lang/StringBuilder;", "")>]
override this.Append : bool -> Java.Lang.IAppendable

Parameters

b
Boolean

the boolean value to append.

Returns

This character sequence after the append operation.

Attributes

Remarks

Java documentation for java.lang.StringBuilder.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.

See also

Applies to

Append(Double)

Appends the string representation of the specified double value.

[Android.Runtime.Register("append", "(D)Ljava/lang/StringBuilder;", "")]
public Java.Lang.IAppendable Append(double d);
[<Android.Runtime.Register("append", "(D)Ljava/lang/StringBuilder;", "")>]
override this.Append : double -> Java.Lang.IAppendable

Parameters

d
Double

the double value to append.

Returns

This character sequence after the append operation.

Attributes

Remarks

Java documentation for java.lang.StringBuilder.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.

See also

Applies to

Append(StringBuffer)

Appends the specified StringBuffer to this sequence.

[Android.Runtime.Register("append", "(Ljava/lang/StringBuffer;)Ljava/lang/StringBuilder;", "")]
public Java.Lang.IAppendable Append(Java.Lang.StringBuffer? sb);
[<Android.Runtime.Register("append", "(Ljava/lang/StringBuffer;)Ljava/lang/StringBuilder;", "")>]
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 this sequence, increasing the length of this sequence by the length of the argument. If sb is null, then the four characters "null" are appended to this sequence.

Let n be the length of this character sequence 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.

Java documentation for java.lang.StringBuilder.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)

Appends the string representation of the specified Object.

[Android.Runtime.Register("append", "(Ljava/lang/Object;)Ljava/lang/StringBuilder;", "")]
public Java.Lang.IAppendable Append(Java.Lang.Object? obj);
[<Android.Runtime.Register("append", "(Ljava/lang/Object;)Ljava/lang/StringBuilder;", "")>]
override this.Append : Java.Lang.Object -> Java.Lang.IAppendable

Parameters

obj
Object

the Object to append.

Returns

This character sequence after the append operation.

Attributes

Remarks

Java documentation for java.lang.StringBuilder.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.

See also

Applies to

Append(ICharSequence)

Appends the string representation of the specified CharSequence.

[Android.Runtime.Register("append", "(Ljava/lang/CharSequence;)Ljava/lang/StringBuilder;", "")]
public override Java.Lang.IAppendable Append(Java.Lang.ICharSequence? s);
[<Android.Runtime.Register("append", "(Ljava/lang/CharSequence;)Ljava/lang/StringBuilder;", "")>]
override this.Append : Java.Lang.ICharSequence -> Java.Lang.IAppendable

Parameters

s
ICharSequence

The character sequence to append.

Returns

This character sequence after the append operation.

Implements

Attributes

Remarks

Java documentation for java.lang.StringBuilder.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