nextInt


Description:

public int nextInt ()

Reads the next token and parses it as an integer.

Returns 0 if the token cannot be parsed or there are no more tokens.

Example:

    var scanner = Scanner.fromString ("42 hello");
assert (scanner.nextInt () == 42);

Returns:

the parsed integer value, or 0 on failure.