Android Guides | Samples

Java.Lang.String.StartsWith Method

Compares the specified string to this string, starting at the specified offset, to determine if the specified string is a prefix.

Syntax

[Android.Runtime.Register("startsWith", "(Ljava/lang/String;I)Z", "")]
public Boolean StartsWith (String prefix, Int32 start)

Parameters

prefix
the string to look for.
start
the starting offset.

Exceptions

TypeReason
NullPointerExceptionif prefix is null.

Remarks

Compares the specified string to this string, starting at the specified offset, to determine if the specified string is a prefix.

[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