scanf

Last updated:

0 purchases

scanf Image
scanf Images
Add to Cart

Description:

scanf

A scanf-like implementation in pure Dart. For maximum speed, the pattern is
compiled into a list of scanners, which can perform very fast.
Features #
A very short example, how to use this package:
import 'package:scanf/scanf.dart';

void main() {
final scanf = ScanF('Pi: %f, Int=%i, Octal=%o %[^:]:%f%%, %[a-c]%s');
final result = scanf.match('Pi: 3.14, Int=0xCAFEBABE, Octal=755 Progress:34.2%, abcdef');
print('$result');
}
copied to clipboard
Notes #
Being an old-fashioned C programmer, I have been using scanf-like functions all my life.
When I got into Dart/Flutter, I started to love this language and concepts more and more.
But regular expressions (RegEx) are still unlearnable for people like me,
so I looked around for a scanf-like implementation in Dart.
Surprisingly, I couldn't find anything. When I started a small project with rsync, the need for a
"stdout" parser arose.
With this package I was able to process the output of rsync without any problems, crating a usable progress display.

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.