Update lib.rs

This commit is contained in:
Daniella 2023-01-30 02:12:26 +01:00 committed by GitHub
parent 7dfe24da26
commit 3416153081
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -5,7 +5,7 @@
///
/// Examples:
/// - `readf("Hello, {}!", "Hello, world!")` => `Some(vec!["world"])`
/// - `readf("I hope {} are {}!", "I hope you are doing well!")` => `Some(vec!["you", "well"])`
/// - `readf("I hope {} are doing {}!", "I hope you are doing well!")` => `Some(vec!["you", "well"])`
/// - `readf("Goodbye, {}!", "Hello, world!")` => `None`
pub fn readf(format: &str, mut s: &str) -> Option<Vec<String>> {
if !format.contains("{}") {