Condividi tramite


AbstractStringBuilder.SubSequence(Int32, Int32) Method

Definition

Returns a new character sequence that is a subsequence of this sequence.

public string? SubSequence (int start, int end);
member this.SubSequence : int * int -> string

Parameters

start
Int32

the start index, inclusive.

end
Int32

the end index, exclusive.

Returns

the specified subsequence.

Remarks

Returns a new character sequence that is a subsequence of this sequence.

An invocation of this method of the form

{@code
            sb.subSequence(begin, end)}

behaves in exactly the same way as the invocation

{@code
            sb.substring(begin, end)}

This method is provided so that this class can implement the CharSequence interface.

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