From ca1ad2bab474caeb262419866785345941ecefe2 Mon Sep 17 00:00:00 2001 From: cyz-ing <1316769374@qq.com> Date: Sun, 19 Jan 2025 01:31:32 +0000 Subject: [PATCH] finish strings4 --- exercises/strings/strings4.rs | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/exercises/strings/strings4.rs b/exercises/strings/strings4.rs index e8c54acc..41dea4a0 100644 --- a/exercises/strings/strings4.rs +++ b/exercises/strings/strings4.rs @@ -17,14 +17,14 @@ fn string(arg: String) { } fn main() { - ???("blue"); - ???("red".to_string()); - ???(String::from("hi")); - ???("rust is fun!".to_owned()); - ???("nice weather".into()); - ???(format!("Interpolation {}", "Station")); - ???(&String::from("abc")[0..1]); - ???(" hello there ".trim()); - ???("Happy Monday!".to_string().replace("Mon", "Tues")); - ???("mY sHiFt KeY iS sTiCkY".to_lowercase()); + string_slice("blue"); + string("red".to_string()); + string(String::from("hi")); + string("rust is fun!".to_owned()); + string("nice weather".into()); + string(format!("Interpolation {}", "Station")); + string_slice(&String::from("abc")[0..1]); + string_slice(" hello there ".trim()); + string("Happy Monday!".to_string().replace("Mon", "Tues")); + string("mY sHiFt KeY iS sTiCkY".to_lowercase()); }