Android Guides | Samples

Java.Lang.String.StartsWith Method

Compares the specified string to this string to determine if the specified string is a prefix.

Syntax

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

Parameters

prefix
the string to look for.

Exceptions

TypeReason
NullPointerExceptionif prefix is null.

Remarks

Compares the specified string to this string 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