Very small format reader
Find a file
2023-01-02 18:23:52 +01:00
src fix not finding a result in some patterns 2023-01-02 18:23:52 +01:00
.gitignore Initial commit 2023-01-01 19:22:38 +01:00
Cargo.toml fix not finding a result in some patterns 2023-01-02 18:23:52 +01:00
README.md add readme 2023-01-01 19:38:22 +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 {}!", "I hope you are doing well!") => Some(vec!["you", "well"])
  • readf1("Goodbye, {}!", "Hello, world!") => None