Sdílet prostřednictvím


Scanner.Next Method

Definition

Overloads

Next()

Finds and returns the next complete token from this scanner.

Next(Pattern)

Returns the next token if it matches the specified pattern.

Next(String)

Returns the next token if it matches the pattern constructed from the specified string.

Next()

Finds and returns the next complete token from this scanner.

[Android.Runtime.Register("next", "()Ljava/lang/String;", "")]
public string? Next ();
[<Android.Runtime.Register("next", "()Ljava/lang/String;", "")>]
member this.Next : unit -> string

Returns

the next token

Attributes

Exceptions

if this Scanner has been closed.

if input has been exhausted.

Remarks

Java documentation for java.util.Scanner.next().

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

Next(Pattern)

Returns the next token if it matches the specified pattern.

[Android.Runtime.Register("next", "(Ljava/util/regex/Pattern;)Ljava/lang/String;", "")]
public string? Next (Java.Util.Regex.Pattern? pattern);
[<Android.Runtime.Register("next", "(Ljava/util/regex/Pattern;)Ljava/lang/String;", "")>]
member this.Next : Java.Util.Regex.Pattern -> string

Parameters

pattern
Pattern

the pattern to scan for

Returns

the next token

Attributes

Exceptions

if this Scanner has been closed.

if input has been exhausted.

if the next token does not match the pattern given.

Remarks

Java documentation for java.util.Scanner.next(java.util.regex.Pattern).

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

Next(String)

Returns the next token if it matches the pattern constructed from the specified string.

[Android.Runtime.Register("next", "(Ljava/lang/String;)Ljava/lang/String;", "")]
public string? Next (string? pattern);
[<Android.Runtime.Register("next", "(Ljava/lang/String;)Ljava/lang/String;", "")>]
member this.Next : string -> string

Parameters

pattern
String

a string specifying the pattern to scan

Returns

the next token

Attributes

Exceptions

if this Scanner has been closed.

if input has been exhausted.

if the next token does not match the pattern given.

Remarks

Java documentation for java.util.Scanner.next(java.lang.String).

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