scanner

version 1.0.0 build status

Port of Java's Scanner class to Dart. Works asynchronously.

Usage

Printing the contents of a file:

import 'dart:io';
import 'package:scanner/scanner.dart';

main() async {
  var file = new File.fromUri(Platform.script.resolve('../README.md'));
  var scanner = new Scanner(file.openRead());

  while (await scanner.hasNextLine()) {
    print(await scanner.nextLine());
  }
}

Libraries

scanner