共用方式為


StringBuilder Constructors

Definition

Overloads

StringBuilder()

Constructs a string builder with no characters in it and an initial capacity of 16 characters.

StringBuilder(ICharSequence)

Constructs a string builder that contains the same characters as the specified CharSequence.

StringBuilder(Int32)

Constructs a string builder with no characters in it and an initial capacity specified by the capacity argument.

StringBuilder(String)

Constructs a string builder initialized to the contents of the specified string.

StringBuilder()

Constructs a string builder with no characters in it and an initial capacity of 16 characters.

[Android.Runtime.Register(".ctor", "()V", "")]
public StringBuilder ();
Attributes

Remarks

Constructs a string builder with no characters in it and an initial capacity of 16 characters.

Java documentation for java.lang.StringBuilder.StringBuilder().

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

StringBuilder(ICharSequence)

Constructs a string builder that contains the same characters as the specified CharSequence.

[Android.Runtime.Register(".ctor", "(Ljava/lang/CharSequence;)V", "")]
public StringBuilder (Java.Lang.ICharSequence seq);
[<Android.Runtime.Register(".ctor", "(Ljava/lang/CharSequence;)V", "")>]
new Java.Lang.StringBuilder : Java.Lang.ICharSequence -> Java.Lang.StringBuilder

Parameters

seq
ICharSequence

the sequence to copy.

Attributes

Exceptions

if seq is null.

Remarks

Constructs a string builder that contains the same characters as the specified CharSequence. The initial capacity of the string builder is 16 plus the length of the CharSequence argument.

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

StringBuilder(Int32)

Constructs a string builder with no characters in it and an initial capacity specified by the capacity argument.

[Android.Runtime.Register(".ctor", "(I)V", "")]
public StringBuilder (int capacity);
[<Android.Runtime.Register(".ctor", "(I)V", "")>]
new Java.Lang.StringBuilder : int -> Java.Lang.StringBuilder

Parameters

capacity
Int32

the initial capacity.

Attributes

Exceptions

if the specified capacity is negative.

Remarks

Constructs a string builder with no characters in it and an initial capacity specified by the capacity argument.

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

StringBuilder(String)

Constructs a string builder initialized to the contents of the specified string.

[Android.Runtime.Register(".ctor", "(Ljava/lang/String;)V", "")]
public StringBuilder (string str);
[<Android.Runtime.Register(".ctor", "(Ljava/lang/String;)V", "")>]
new Java.Lang.StringBuilder : string -> Java.Lang.StringBuilder

Parameters

str
String

the initial contents of the buffer.

Attributes

Exceptions

if str is null.

Remarks

Constructs a string builder initialized to the contents of the specified string. The initial capacity of the string builder is 16 plus the length of the string argument.

Java documentation for java.lang.StringBuilder.StringBuilder(java.lang.String).

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