Scanner


Object Hierarchy:

Object hierarchy for Scanner

Description:

public class Scanner : Object

Scanner splits input into tokens and provides typed parsing.

Inspired by Java's Scanner and Go's bufio.Scanner, this class reads from a file, string, or standard input and returns tokens separated by a configurable delimiter (default: whitespace).

Example:

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


Namespace: Vala.Io
Package: Valacore

Content:

Static methods:

Methods:

Inherited Members:

All known members inherited from class GLib.Object