Crate lib_dice [] [src]

A library for parcing dice rolls using nom.

Usage

extern crate lib_dice;
fn main() {
    let roll_1 = lib_dice::roll(1, 8, 0); // 1d8 + 0
    let roll_2 = lib_dice::roll_from_str("2d6 + 7");
}

Functions

roll

Simulate a random dice roll using the rand crate.

roll_from_str

Parse a dice roll from a sting in one of the following formats