Android Guides | Samples

Java.Lang.StringBuilder Class

A modifiable ICharSequence for use in creating strings.

See Also: StringBuilder

Syntax

[Android.Runtime.Register("java/lang/StringBuilder", DoNotGenerateAcw=true)]
public sealed class StringBuilder : AbstractStringBuilder, ISerializable, IEnumerable<char>, IDisposable

Remarks

A modifiable ICharSequence for use in creating strings. This class is intended as a direct replacement of StringBuffer for non-concurrent use; unlike StringBuffer this class is not synchronized.

For particularly complex string-building needs, consider Formatter.

The majority of the modification methods on this class return this so that method calls can be chained together. For example: new StringBuilder("a").append("b").append("c").toString().

See Also

[Android Documentation]

Requirements

Namespace: Java.Lang
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1

The members of Java.Lang.StringBuilder are listed below.

See Also: AbstractStringBuilder

Public Constructors

Constructs an instance with an initial capacity of 16.
Constructs an instance that's initialized with the contents of the specified CharSequence.
Constructs an instance with the specified capacity.
Constructs an instance that's initialized with the contents of the specified String.

Protected Properties

[read-only]
override
ThresholdClassIntPtr. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.
[read-only]
override
ThresholdTypeType. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

Public Methods

override
Append(ICharSequence) : IAppendable
Appends the string representation of the specified CharSequence.
Append(Object) : IAppendable
Appends the string representation of the specified Object.
Append(StringBuffer) : IAppendable
Appends the contents of the specified StringBuffer.
Append(Boolean) : IAppendable
Appends the string representation of the specified boolean value.
override
Append(Char) : IAppendable
Appends the string representation of the specified char value.
Append(Char[]) : IAppendable
Appends the string representation of the specified char[].
Append(Double) : IAppendable
Appends the string representation of the specified double value.
Append(Int32) : IAppendable
Appends the string representation of the specified int value.
Append(Int64) : IAppendable
Appends the string representation of the specified long value.
Append(Single) : IAppendable
Appends the string representation of the specified float value.
Append(String) : IAppendable
Appends the contents of the specified string.
override
Append(ICharSequence, Int32, Int32) : IAppendable
Appends the string representation of the specified subsequence of the CharSequence.
Append(Char[], Int32, Int32) : IAppendable
Appends the string representation of the specified subset of the char[].
AppendCodePoint(Int32) : StringBuilder
Appends the encoded Unicode code point.
override
Capacity() : Int32
Returns the number of characters that can be held without growing.
override
CharAt(Int32) : Char
Returns the character at index.
override
CodePointAt(Int32) : Int32
Retrieves the Unicode code point value at the index.
override
CodePointBefore(Int32) : Int32
Retrieves the Unicode code point value that precedes the index.
override
CodePointCount(Int32, Int32) : Int32
Calculates the number of Unicode code points between start and end.
Delete(Int32, Int32) : StringBuilder
Deletes a sequence of characters specified by start and end.
DeleteCharAt(Int32) : StringBuilder
Deletes the character at the specified index. shifts any remaining characters to the left.
override
EnsureCapacity(Int32)
Ensures that this object has a minimum capacity available before requiring the internal buffer to be enlarged.
override
GetChars(Int32, Int32, Char[], Int32)
Copies the requested sequence of characters into dst passed starting at dst.
GetEnumerator() : IEnumerator<char>
override
IndexOf(String) : Int32
Searches for the first index of the specified character.
override
IndexOf(String, Int32) : Int32
Searches for the index of the specified character.
Insert(Int32, ICharSequence) : StringBuilder
Inserts the string representation of the specified CharSequence at the specified offset.
Insert(Int32, Object) : StringBuilder
Inserts the string representation of the specified Object at the specified offset.
Insert(Int32, Boolean) : StringBuilder
Inserts the string representation of the specified boolean value at the specified offset.
Insert(Int32, Char) : StringBuilder
Inserts the string representation of the specified char value at the specified offset.
Insert(Int32, Char[]) : StringBuilder
Inserts the string representation of the specified char[] at the specified offset.
Insert(Int32, Double) : StringBuilder
Inserts the string representation of the specified double value at the specified offset.
Insert(Int32, Int32) : StringBuilder
Inserts the string representation of the specified int value at the specified offset.
Insert(Int32, Int64) : StringBuilder
Inserts the string representation of the specified long value at the specified offset.
Insert(Int32, Single) : StringBuilder
Inserts the string representation of the specified float value at the specified offset.
Insert(Int32, String) : StringBuilder
Inserts the specified string at the specified offset.
Insert(Int32, ICharSequence, Int32, Int32) : StringBuilder
Inserts the string representation of the specified subsequence of the CharSequence at the specified offset.
Insert(Int32, Char[], Int32, Int32) : StringBuilder
Inserts the string representation of the specified subsequence of the char[] at the specified offset.
Insert(Int32, String, Int32, Int32) : StringBuilder
override
LastIndexOf(String) : Int32
Searches for the last index of the specified character.
override
LastIndexOf(String, Int32) : Int32
Searches for the index of the specified character.
override
Length() : Int32
The current length.
override
OffsetByCodePoints(Int32, Int32) : Int32
Returns the index that is offset codePointOffset code points from index.
Replace(Int32, Int32, String) : StringBuilder
Replaces the specified subsequence in this builder with the specified string.
Reverse() : StringBuilder
Reverses the order of characters in this builder.
override
SetCharAt(Int32, Char)
Sets the character at the index.
override
SetLength(Int32)
Sets the current length to a new value.
SubSequence(Int32, Int32) : String
override
SubSequenceFormatted(Int32, Int32) : ICharSequence
Returns a CharSequence of the subsequence from the start index to the end index.
override
Substring(Int32) : String
Returns the String value of the subsequence from the start index to the current end.
override
Substring(Int32, Int32) : String
Returns the String value of the subsequence from the start index to the end index.
override
ToString() : String
Returns the contents of this builder.
override
TrimToSize()
Trims off any extra capacity beyond the current length.

Explicitly Implemented Interface Members