minparser

Crates.iominparser
lib.rsminparser
version0.13.2
created_at2024-08-16 21:11:04.453404+00
updated_at2026-01-12 09:24:54.475514+00
descriptionSimple parsing functions
homepagehttps://codeberg.org/Loara/minparser
repositoryhttps://codeberg.org/Loara/minparser
max_upload_size
id1340971
size100,928
(Loara-crates)

documentation

README

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

Commit count: 7

cargo fmt