minparser 0.13.4

Simple parsing functions
Documentation

Minparser

Simple parsing functions

This crate is a collection of objects and algorithms shared among different crates that needs to implement a parser.

Usage examples

use minparser::prelude::*;
let (mtc, step) = View::from("My string   value").match_tool_string(&"My string").unwrap();
assert_eq!(mtc, "My string");
assert_eq!(step.get_view(), "   value"); 
use minparser::prelude::*;
let (data, step) = View::new("9180029a")
.match_tool_data(&RepeatAny::new_unbounded(Predicate::new(
    |c : char| c.is_ascii_digit()), TrueTool)).unwrap();
assert_eq!(data, 7);
assert_eq!(step.get_view(), "a");

Installation

To add minparser as a dependency for your project first add this registry to your $CARGO_HOME/config.toml:

[registries.loara_forgejo]
index = "sparse+https://codeberg.org/api/packages/Loara/cargo/" # Sparse index
# index = "https://codeberg.org/Loara/_cargo-index.git" # Git

[net]
git-fetch-with-cli = true

then run inside your working directory

cargo add --registry loara_forgejo minparser

Links