4 releases (1 stable)

1.0.1 Jan 29, 2025
0.1.2 Jan 2, 2023
0.1.1 Jan 1, 2023
0.1.0 Jan 1, 2023

#1371 in Parser implementations

Download history 36/week @ 2025-02-01 12/week @ 2025-02-08 18/week @ 2025-02-15 8/week @ 2025-02-22 6/week @ 2025-03-01 3/week @ 2025-03-08 9/week @ 2025-03-15 1/week @ 2025-03-22 1/week @ 2025-03-29 6/week @ 2025-04-05 33/week @ 2025-04-12 18/week @ 2025-04-19 26/week @ 2025-04-26 26/week @ 2025-05-03 60/week @ 2025-05-10 78/week @ 2025-05-17

193 downloads per month
Used in 2 crates

MIT license

7KB
140 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 doing {}!", "I hope you are doing well!") => Some(vec!["you", "well"])
  • readf1("Goodbye, {}!", "Hello, world!") => None

No runtime deps