Share via


Scanner.FindWithinHorizon Method

Definition

Overloads

FindWithinHorizon(Pattern, Int32)

Attempts to find the next occurrence of the specified pattern.

FindWithinHorizon(String, Int32)

Attempts to find the next occurrence of a pattern constructed from the specified string, ignoring delimiters.

FindWithinHorizon(Pattern, Int32)

Attempts to find the next occurrence of the specified pattern.

[Android.Runtime.Register("findWithinHorizon", "(Ljava/util/regex/Pattern;I)Ljava/lang/String;", "")]
public string? FindWithinHorizon (Java.Util.Regex.Pattern? pattern, int horizon);
[<Android.Runtime.Register("findWithinHorizon", "(Ljava/util/regex/Pattern;I)Ljava/lang/String;", "")>]
member this.FindWithinHorizon : Java.Util.Regex.Pattern * int -> string

Parameters

pattern
Pattern

the pattern to scan for

horizon
Int32

the search horizon

Returns

the text that matched the specified pattern

Attributes

Exceptions

if the Scanner is closed.

if horizon is less than zero.

Remarks

Java documentation for java.util.Scanner.findWithinHorizon(java.util.regex.Pattern, 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

FindWithinHorizon(String, Int32)

Attempts to find the next occurrence of a pattern constructed from the specified string, ignoring delimiters.

[Android.Runtime.Register("findWithinHorizon", "(Ljava/lang/String;I)Ljava/lang/String;", "")]
public string? FindWithinHorizon (string? pattern, int horizon);
[<Android.Runtime.Register("findWithinHorizon", "(Ljava/lang/String;I)Ljava/lang/String;", "")>]
member this.FindWithinHorizon : string * int -> string

Parameters

pattern
String

a string specifying the pattern to search for

horizon
Int32

the search horizon

Returns

the text that matched the specified pattern

Attributes

Exceptions

if the Scanner is closed.

if horizon is less than zero.

Remarks

Java documentation for java.util.Scanner.findWithinHorizon(java.lang.String, 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.

See also

  • <xref:Java.Util.Scanner.FindWithinHorizon(Java.Util.Regex.Pattern%2c+System.Int32)>

Applies to