Crate adventurous

source ·
Expand description

Adventurous provides utilities to assist you in solving Advent of Code puzzles.

Crates.io Docs.rs Crates.io

Installation

[dependencies]
adventurous = "0.0.3"

Examples

Reading Puzzle Input

extern crate adventurous;

use adventurous::Input;

fn main() -> std::io::Result<()> {
    let input = Input::from_file("input.txt")?;
    for line in input.value.lines() {
        // Do something with the line...
    }
    Ok(())
}

Structs

The input for an Advent of Code puzzle.

Traits

A trait for counting the number of occurrences of each character in a string.