From 038b56dc102e16409823f29e483b165cd1c43178 Mon Sep 17 00:00:00 2001 From: Hunter Kvalevog Date: Sat, 19 Sep 2026 17:59:40 -0500 Subject: rustlings: complete 09 --- rustlings/exercises/09_strings/strings3.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'rustlings/exercises/09_strings/strings3.rs') diff --git a/rustlings/exercises/09_strings/strings3.rs b/rustlings/exercises/09_strings/strings3.rs index f5e45b0..3543ad5 100644 --- a/rustlings/exercises/09_strings/strings3.rs +++ b/rustlings/exercises/09_strings/strings3.rs @@ -1,13 +1,13 @@ fn trim_me(input: &str) -> &str { - // TODO: Remove whitespace from both ends of a string. + input.trim() } fn compose_me(input: &str) -> String { - // TODO: Add " world!" to the string! There are multiple ways to do this. + String::from(input) + " world!" } fn replace_me(input: &str) -> String { - // TODO: Replace "cars" in the string with "balloons". + String::from(input).replace("cars", "balloons") } fn main() { -- cgit v1.2.3