Android Guides | Samples

Java.Lang.String.Substring Method

Returns a string containing the given subsequence of this string.

Syntax

[Android.Runtime.Register("substring", "(II)Ljava/lang/String;", "")]
public String Substring (Int32 start, Int32 end)

Parameters

start
the start offset.
end
the end+1 offset.

Exceptions

TypeReason
IndexOutOfBoundsExceptionif start , start > end or end > length().

Remarks

Returns a string containing the given subsequence of this string. The returned string shares this string's .

[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