Very small format reader
Find a file
2025-12-17 21:49:46 +01:00
src fix a panic 2025-12-17 21:49:46 +01:00
.envrc fix a panic 2025-12-17 20:52:42 +01:00
.gitignore fix a panic 2025-12-17 20:52:42 +01:00
Cargo.toml fix a panic 2025-12-17 21:49:46 +01:00
README.md Update README.md 2023-01-30 02:12:05 +01:00
shell.nix fix a panic 2025-12-17 20:52:42 +01:00

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