TextUtils.Substring Method

Definition

Overloads

Substring(ICharSequence, Int32, Int32)

Create a new String object containing the given range of characters from the source string.

Substring(String, Int32, Int32)

Create a new String object containing the given range of characters from the source string.

Substring(ICharSequence, Int32, Int32)

Create a new String object containing the given range of characters from the source string.

[Android.Runtime.Register("substring", "(Ljava/lang/CharSequence;II)Ljava/lang/String;", "")]
public static string? Substring (Java.Lang.ICharSequence? source, int start, int end);
[<Android.Runtime.Register("substring", "(Ljava/lang/CharSequence;II)Ljava/lang/String;", "")>]
static member Substring : Java.Lang.ICharSequence * int * int -> string

Parameters

source
ICharSequence
start
Int32
end
Int32

Returns

Attributes

Remarks

Create a new String object containing the given range of characters from the source string. This is different than simply calling CharSequence#subSequence(int, int) CharSequence.subSequence in that it does not preserve any style runs in the source sequence, allowing a more efficient implementation.

Java documentation for android.text.TextUtils.substring(java.lang.CharSequence, 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

Substring(String, Int32, Int32)

Create a new String object containing the given range of characters from the source string.

public static string? Substring (string? source, int start, int end);
static member Substring : string * int * int -> string

Parameters

source
String
start
Int32
end
Int32

Returns

Remarks

Create a new String object containing the given range of characters from the source string. This is different than simply calling CharSequence#subSequence(int, int) CharSequence.subSequence in that it does not preserve any style runs in the source sequence, allowing a more efficient implementation.

Java documentation for android.text.TextUtils.substring(java.lang.CharSequence, 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