3 releases

0.1.2 Jan 2, 2023
0.1.1 Jan 1, 2023
0.1.0 Jan 1, 2023

#2674 in Parser implementations

Download history 6/week @ 2024-02-19 106/week @ 2024-02-26 16/week @ 2024-03-04 9/week @ 2024-03-11

137 downloads per month
Used in 2 crates

MIT license

6KB
74 lines

readformat

The inverse of format!(). The format argument is the format string, and the s argument is the string to match the format against.

Examples:

  • readf1("Hello, {}!", "Hello, world!") => Some("world")
  • readf("I hope {} are {}!", "I hope you are doing well!") => Some(vec!["you", "well"])
  • readf1("Goodbye, {}!", "Hello, world!") => None

No runtime deps