fromString


Description:

public static Scanner fromString (string s)

Creates a Scanner that reads from a string.

Example:

    var scanner = Scanner.fromString ("10 20 30");
assert (scanner.nextInt () == 10);

Parameters:

s

the string to read from.

Returns:

a new Scanner.