From eb0c4f8aa4e74b91c2d1f371e1f645d9b20e3157 Mon Sep 17 00:00:00 2001 From: akshitgautam42 Date: Mon, 13 Nov 2023 18:13:18 +0530 Subject: [PATCH] Exercise 40 --- exercises/09_strings/strings3.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/exercises/09_strings/strings3.rs b/exercises/09_strings/strings3.rs index b29f9325..7b92ca7d 100644 --- a/exercises/09_strings/strings3.rs +++ b/exercises/09_strings/strings3.rs @@ -3,21 +3,21 @@ // Execute `rustlings hint strings3` or use the `hint` watch subcommand for a // hint. -// I AM NOT DONE + fn trim_me(input: &str) -> String { // TODO: Remove whitespace from both ends of a string! - ??? + input.trim().to_string() } fn compose_me(input: &str) -> String { // TODO: Add " world!" to the string! There's multiple ways to do this! - ??? + input.to_string()+" world!" } fn replace_me(input: &str) -> String { // TODO: Replace "cars" in the string with "balloons"! - ??? + input.replace("cars", "balloons") } #[cfg(test)]