StringBuffer Constructors
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
StringBuffer() |
Constructs a string buffer with no characters in it and an initial capacity of 16 characters. |
StringBuffer(ICharSequence) |
Constructs a string buffer that contains the same characters
as the specified |
StringBuffer(Int32) |
Constructs a string buffer with no characters in it and the specified initial capacity. |
StringBuffer(String) |
Constructs a string buffer initialized to the contents of the specified string. |
StringBuffer()
Constructs a string buffer with no characters in it and an initial capacity of 16 characters.
[Android.Runtime.Register(".ctor", "()V", "")]
public StringBuffer ();
- Attributes
Remarks
Constructs a string buffer with no characters in it and an initial capacity of 16 characters.
Java documentation for java.lang.StringBuffer.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
StringBuffer(ICharSequence)
Constructs a string buffer that contains the same characters
as the specified CharSequence
.
[Android.Runtime.Register(".ctor", "(Ljava/lang/CharSequence;)V", "")]
public StringBuffer (Java.Lang.ICharSequence seq);
[<Android.Runtime.Register(".ctor", "(Ljava/lang/CharSequence;)V", "")>]
new Java.Lang.StringBuffer : Java.Lang.ICharSequence -> Java.Lang.StringBuffer
Parameters
- seq
- ICharSequence
the sequence to copy.
- Attributes
Exceptions
if cs
is null
.
Remarks
Constructs a string buffer that contains the same characters as the specified CharSequence
. The initial capacity of the string buffer is 16
plus the length of the CharSequence
argument.
If the length of the specified CharSequence
is less than or equal to zero, then an empty buffer of capacity 16
is returned.
Added in 1.5.
Java documentation for java.lang.StringBuffer.StringBuffer(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
StringBuffer(Int32)
Constructs a string buffer with no characters in it and the specified initial capacity.
[Android.Runtime.Register(".ctor", "(I)V", "")]
public StringBuffer (int capacity);
[<Android.Runtime.Register(".ctor", "(I)V", "")>]
new Java.Lang.StringBuffer : int -> Java.Lang.StringBuffer
Parameters
- capacity
- Int32
the initial capacity.
- Attributes
Remarks
Constructs a string buffer with no characters in it and the specified initial capacity.
Java documentation for java.lang.StringBuffer.StringBuffer(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
StringBuffer(String)
Constructs a string buffer initialized to the contents of the specified string.
[Android.Runtime.Register(".ctor", "(Ljava/lang/String;)V", "")]
public StringBuffer (string str);
[<Android.Runtime.Register(".ctor", "(Ljava/lang/String;)V", "")>]
new Java.Lang.StringBuffer : string -> Java.Lang.StringBuffer
Parameters
- str
- String
the initial contents of the buffer.
- Attributes
Exceptions
if string
is null
.
Remarks
Constructs a string buffer initialized to the contents of the specified string. The initial capacity of the string buffer is 16
plus the length of the string argument.
Java documentation for java.lang.StringBuffer.StringBuffer(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.