Crates.io | MyFirstParserTarasenko |
lib.rs | MyFirstParserTarasenko |
version | 0.1.1 |
source | src |
created_at | 2024-10-24 20:30:45.715026 |
updated_at | 2024-10-24 20:39:10.483307 |
description | My fisrt simple parser |
homepage | |
repository | |
max_upload_size | |
id | 1421752 |
size | 225,924 |
My Parser
Welcome to My Parser, an educational crate designed to help you parse lists of numbers in string format. If you're looking to learn how parsers work or need a simple tool to parse numbers, this crate is for you!
Description
This parser is meant for educational purposes, allowing you to parse a list of numbers given in string format like "[1, 1, 2, 3, 5, 8]" and convert it into a Vec
Examples
Parsing a Valid List
You can use my_parser_striletska to parse a list of numbers:
use MyFirstParserTarasenko::list_parser;
pub fn main() {
assert_eq!(list_parser::list("[1,1,2,3,5,8]"), Ok(vec![1, 1, 2, 3, 5, 8]));
println!("{:?}", list_parser::list("[1,1,2,3,5,8]"));
}