Android Guides | Samples

Java.Lang.String.Split Method

Splits this string using the supplied regularExpression.

Syntax

[Android.Runtime.Register("split", "(Ljava/lang/String;I)[Ljava/lang/String;", "")]
public String[] Split (String expr, Int32 max)

Parameters

regularExpression
limit

Exceptions

TypeReason
NullPointerExceptionif regularExpression == null
!:NoType:if the syntax of the supplied regular expression is not valid.

Remarks

Splits this string using the supplied regularExpression. See Pattern.Split(ICharSequence,Int32) for an explanation of limit. See Pattern for regular expression syntax.

If the same regular expression is to be used for multiple operations, it may be more efficient to reuse a compiled Pattern.

[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