summaryrefslogtreecommitdiff
path: root/exercises/09_strings
diff options
context:
space:
mode:
Diffstat (limited to 'exercises/09_strings')
-rw-r--r--exercises/09_strings/strings1.rs5
-rw-r--r--exercises/09_strings/strings2.rs5
-rw-r--r--exercises/09_strings/strings3.rs9
-rw-r--r--exercises/09_strings/strings4.rs6
4 files changed, 5 insertions, 20 deletions
diff --git a/exercises/09_strings/strings1.rs b/exercises/09_strings/strings1.rs
index a1255a3..de762eb 100644
--- a/exercises/09_strings/strings1.rs
+++ b/exercises/09_strings/strings1.rs
@@ -1,9 +1,4 @@
-// strings1.rs
-//
// Make me compile without changing the function signature!
-//
-// Execute `rustlings hint strings1` or use the `hint` watch subcommand for a
-// hint.
fn main() {
let answer = current_favorite_color();
diff --git a/exercises/09_strings/strings2.rs b/exercises/09_strings/strings2.rs
index ba76fe6..4768278 100644
--- a/exercises/09_strings/strings2.rs
+++ b/exercises/09_strings/strings2.rs
@@ -1,9 +1,4 @@
-// strings2.rs
-//
// Make me compile without changing the function signature!
-//
-// Execute `rustlings hint strings2` or use the `hint` watch subcommand for a
-// hint.
fn main() {
let word = String::from("green"); // Try not changing this line :)
diff --git a/exercises/09_strings/strings3.rs b/exercises/09_strings/strings3.rs
index dedc081..f83a531 100644
--- a/exercises/09_strings/strings3.rs
+++ b/exercises/09_strings/strings3.rs
@@ -1,8 +1,3 @@
-// strings3.rs
-//
-// Execute `rustlings hint strings3` or use the `hint` watch subcommand for a
-// hint.
-
fn trim_me(input: &str) -> String {
// TODO: Remove whitespace from both ends of a string!
???
@@ -18,6 +13,10 @@ fn replace_me(input: &str) -> String {
???
}
+fn main() {
+ // You can optionally experiment here.
+}
+
#[cfg(test)]
mod tests {
use super::*;
diff --git a/exercises/09_strings/strings4.rs b/exercises/09_strings/strings4.rs
index a034aa4..1f3d88b 100644
--- a/exercises/09_strings/strings4.rs
+++ b/exercises/09_strings/strings4.rs
@@ -1,11 +1,7 @@
-// strings4.rs
-//
-// Ok, here are a bunch of values-- some are `String`s, some are `&str`s. Your
+// Ok, here are a bunch of values - some are `String`s, some are `&str`s. Your
// task is to call one of these two functions on each value depending on what
// you think each value is. That is, add either `string_slice` or `string`
// before the parentheses on each line. If you're right, it will compile!
-//
-// No hints this time!
fn string_slice(arg: &str) {
println!("{}", arg);