Skip to content

Commit

Permalink
Updated TODO in strings3.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
GURUSUJAN authored Dec 25, 2024
1 parent 26cf498 commit cf62575
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions exercises/09_strings/strings3.rs
Original file line number Diff line number Diff line change
@@ -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() {
Expand Down

0 comments on commit cf62575

Please sign in to comment.