StringBuilder StringBuilder Class

Definition

A modifiable ICharSequence for use in creating strings.

[Android.Runtime.Register("java/lang/StringBuilder", ApiSince=1, DoNotGenerateAcw=true)]
public sealed class StringBuilder : Java.Lang.AbstractStringBuilder, IDisposable, Java.IO.ISerializable, System.Collections.Generic.IEnumerable<char>
type StringBuilder = class
    inherit AbstractStringBuilder
    interface ISerializable
    interface IJavaObject
    interface IDisposable
    interface IAppendable
    interface ICharSequence
    interface seq<char>
    interface IEnumerable
Inheritance
Attributes
Implements

Remarks

Android platform documentation

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.

Constructors

StringBuilder() StringBuilder()

Constructs an instance with an initial capacity of 16.

StringBuilder(ICharSequence) StringBuilder(ICharSequence)

Constructs an instance that's initialized with the contents of the specified CharSequence.

StringBuilder(Int32) StringBuilder(Int32)

Constructs an instance with the specified capacity.

StringBuilder(String) StringBuilder(String)

Constructs an instance that's initialized with the contents of the specified String.

Properties

Class Class

Returns the unique instance of Class that represents this object's class.

(Inherited from Object)
Handle Handle

The handle to the underlying Android instance.

(Inherited from Object)
IJavaObjectEx.IsProxy IJavaObjectEx.IsProxy Inherited from Object
IJavaObjectEx.KeyHandle IJavaObjectEx.KeyHandle Inherited from Object
IJavaObjectEx.NeedsActivation IJavaObjectEx.NeedsActivation Inherited from Object
IJavaPeerable.JniManagedPeerState IJavaPeerable.JniManagedPeerState Inherited from Object
JniIdentityHashCode JniIdentityHashCode Inherited from Object
JniPeerMembers JniPeerMembers
PeerReference PeerReference Inherited from Object
ThresholdClass ThresholdClass Inherited from AbstractStringBuilder
ThresholdType ThresholdType Inherited from AbstractStringBuilder

Methods

Append(Boolean) Append(Boolean)

Appends the string representation of the specified boolean value.

Append(Char) Append(Char)

Appends the string representation of the specified char value.

Append(Char[]) Append(Char[])

Appends the string representation of the specified char[].

Append(Char[], Int32, Int32) Append(Char[], Int32, Int32)

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

Append(Double) Append(Double)

Appends the string representation of the specified double value.

Append(ICharSequence) Append(ICharSequence)

Appends the string representation of the specified CharSequence.

Append(ICharSequence, Int32, Int32) Append(ICharSequence, Int32, Int32)

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

Append(Int32) Append(Int32)

Appends the string representation of the specified int value.

Append(Int64) Append(Int64)

Appends the string representation of the specified long value.

Append(Object) Append(Object)

Appends the string representation of the specified Object.

Append(Single) Append(Single)

Appends the string representation of the specified float value.

Append(String) Append(String)

Appends the contents of the specified string.

Append(String, Int32, Int32) Append(String, Int32, Int32)
Append(StringBuffer) Append(StringBuffer)

Appends the contents of the specified StringBuffer.

AppendCodePoint(Int32) AppendCodePoint(Int32)

Appends the encoded Unicode code point.

Capacity() Capacity()

Returns the number of characters that can be held without growing.

CharAt(Int32) CharAt(Int32)

Returns the character at index.

Clone() Clone()

Creates and returns a copy of this Object.

(Inherited from Object)
CodePointAt(Int32) CodePointAt(Int32)

Retrieves the Unicode code point value at the index.

CodePointBefore(Int32) CodePointBefore(Int32)

Retrieves the Unicode code point value that precedes the index.

CodePointCount(Int32, Int32) CodePointCount(Int32, Int32)

Calculates the number of Unicode code points between start and end.

Delete(Int32, Int32) Delete(Int32, Int32)

Deletes a sequence of characters specified by start and end.

DeleteCharAt(Int32) DeleteCharAt(Int32)

Deletes the character at the specified index. shifts any remaining characters to the left.

Dispose() Dispose() Inherited from Object
Dispose(Boolean) Dispose(Boolean) Inherited from Object
EnsureCapacity(Int32) EnsureCapacity(Int32)

Ensures that this object has a minimum capacity available before requiring the internal buffer to be enlarged.

Equals(Object) Equals(Object)

Compares this instance with the specified object and indicates if they are equal.

(Inherited from Object)
GetChars(Int32, Int32, Char[], Int32) GetChars(Int32, Int32, Char[], Int32)

Copies the requested sequence of characters into dst passed starting at dst.

GetEnumerator() GetEnumerator()
GetHashCode() GetHashCode()

Returns an integer hash code for this object.

(Inherited from Object)
IndexOf(String) IndexOf(String)

Searches for the first index of the specified character.

IndexOf(String, Int32) IndexOf(String, Int32)

Searches for the index of the specified character.

Insert(Int32, Boolean) Insert(Int32, Boolean)

Inserts the string representation of the specified boolean value at the specified offset.

Insert(Int32, Char) Insert(Int32, Char)

Inserts the string representation of the specified char value at the specified offset.

Insert(Int32, Char[]) Insert(Int32, Char[])

Inserts the string representation of the specified char[] at the specified offset.

Insert(Int32, Char[], Int32, Int32) Insert(Int32, Char[], Int32, Int32)

Inserts the string representation of the specified subsequence of the char[] at the specified offset.

Insert(Int32, Double) Insert(Int32, Double)

Inserts the string representation of the specified double value at the specified offset.

Insert(Int32, ICharSequence) Insert(Int32, ICharSequence)

Inserts the string representation of the specified CharSequence at the specified offset.

Insert(Int32, ICharSequence, Int32, Int32) Insert(Int32, ICharSequence, Int32, Int32)

Inserts the string representation of the specified subsequence of the CharSequence at the specified offset.

Insert(Int32, Int32) Insert(Int32, Int32)

Inserts the string representation of the specified int value at the specified offset.

Insert(Int32, Int64) Insert(Int32, Int64)

Inserts the string representation of the specified long value at the specified offset.

Insert(Int32, Object) Insert(Int32, Object)

Inserts the string representation of the specified Object at the specified offset.

Insert(Int32, Single) Insert(Int32, Single)

Inserts the string representation of the specified float value at the specified offset.

Insert(Int32, String) Insert(Int32, String)

Inserts the specified string at the specified offset.

Insert(Int32, String, Int32, Int32) Insert(Int32, String, Int32, Int32)
JavaFinalize() JavaFinalize()

Invoked when the garbage collector has detected that this instance is no longer reachable.

(Inherited from Object)
LastIndexOf(String) LastIndexOf(String)

Searches for the last index of the specified character.

LastIndexOf(String, Int32) LastIndexOf(String, Int32)

Searches for the index of the specified character.

Length() Length()

The current length.

Notify() Notify()

Causes a thread which is waiting on this object's monitor (by means of calling one of the wait() methods) to be woken up.

(Inherited from Object)
NotifyAll() NotifyAll()

Causes all threads which are waiting on this object's monitor (by means of calling one of the wait() methods) to be woken up.

(Inherited from Object)
OffsetByCodePoints(Int32, Int32) OffsetByCodePoints(Int32, Int32)

Returns the index that is offset codePointOffset code points from index.

Replace(Int32, Int32, String) Replace(Int32, Int32, String)

Replaces the specified subsequence in this builder with the specified string.

Reverse() Reverse()

Reverses the order of characters in this builder.

SetCharAt(Int32, Char) SetCharAt(Int32, Char)

Sets the character at the index.

SetHandle(IntPtr, JniHandleOwnership) SetHandle(IntPtr, JniHandleOwnership)

Sets the Handle property.

(Inherited from Object)
SetLength(Int32) SetLength(Int32)

Sets the current length to a new value.

SubSequence(Int32, Int32) SubSequence(Int32, Int32)
SubSequenceFormatted(Int32, Int32) SubSequenceFormatted(Int32, Int32)

Returns a CharSequence of the subsequence from the start index to the end index.

Substring(Int32) Substring(Int32)

Returns the String value of the subsequence from the start index to the current end.

Substring(Int32, Int32) Substring(Int32, Int32)

Returns the String value of the subsequence from the start index to the end index.

ToArray<T>() ToArray<T>() Inherited from Object
ToString() ToString()

Returns the contents of this builder.

TrimToSize() TrimToSize()

Trims off any extra capacity beyond the current length.

UnregisterFromRuntime() UnregisterFromRuntime() Inherited from Object
Wait() Wait()

Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object.

(Inherited from Object)
Wait(Int64) Wait(Int64)

Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the specified timeout expires.

(Inherited from Object)
Wait(Int64, Int32) Wait(Int64, Int32)

Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the specified timeout expires.

(Inherited from Object)

Explicit Interface Implementations

IEnumerable.GetEnumerator() IEnumerable.GetEnumerator()
IJavaObjectEx.ToLocalJniHandle() IJavaObjectEx.ToLocalJniHandle() Inherited from Object
IJavaPeerable.Disposed() IJavaPeerable.Disposed() Inherited from Object
IJavaPeerable.DisposeUnlessReferenced() IJavaPeerable.DisposeUnlessReferenced() Inherited from Object
IJavaPeerable.Finalized() IJavaPeerable.Finalized() Inherited from Object
IJavaPeerable.SetJniIdentityHashCode(Int32) IJavaPeerable.SetJniIdentityHashCode(Int32) Inherited from Object
IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) Inherited from Object
IJavaPeerable.SetPeerReference(JniObjectReference) IJavaPeerable.SetPeerReference(JniObjectReference) Inherited from Object

Extension Methods

JavaCast<TResult>(IJavaObject) JavaCast<TResult>(IJavaObject)

Performs an Android runtime-checked type conversion.

JavaCast<TResult>(IJavaObject) JavaCast<TResult>(IJavaObject)
GetJniTypeName(IJavaPeerable) GetJniTypeName(IJavaPeerable)
Append(IAppendable, String) Append(IAppendable, String)
Append(IAppendable, String, Int32, Int32) Append(IAppendable, String, Int32, Int32)
SubSequence(ICharSequence, Int32, Int32) SubSequence(ICharSequence, Int32, Int32)

Applies to