From cf6257568047a030db689f4dda773bce0d1b2b48 Mon Sep 17 00:00:00 2001 From: GURUSUJAN REDDY <94339643+GURUSUJAN@users.noreply.github.com> Date: Thu, 26 Dec 2024 01:41:14 +0530 Subject: [PATCH] Updated TODO in strings3.rs --- exercises/09_strings/strings3.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/exercises/09_strings/strings3.rs b/exercises/09_strings/strings3.rs index 39fce18c..6bd49bdb 100644 --- a/exercises/09_strings/strings3.rs +++ b/exercises/09_strings/strings3.rs @@ -1,13 +1,17 @@ fn trim_me(input: &str) -> &str { // 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 are multiple ways to do this. + let result = input.to_string() + " world!"; + result } fn replace_me(input: &str) -> String { // TODO: Replace "cars" in the string with "balloons". + input.replace("world", "rustaceans") } fn main() {