Advent of Code Rust utilities
About
This crate provides a very minimal set of utils to get started with writing Advent of Code solutions.
BufferedInput
Description
This is a wrapper over an input source (either a file or STDIN). It can be conveniently constructed by parsing cmdline arguments.
Here is an example help printout generated from a program that uses BufferedInput
:
Example description
USAGE:
prog [FILE]
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
ARGS:
<FILE> Input file (defaults to STDIN if not provided)
Usage
Collect all lines from input:
use BufRead;
use BufferedInput;
let input = parse_args.unwrap;
let lines: = input.lines.map.collect;
for line in lines