We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 897ab68 commit 5229adeCopy full SHA for 5229ade
rustlang_book/collections/strings/Cargo.toml
@@ -0,0 +1,8 @@
1
+[package]
2
+name = "strings"
3
+version = "0.1.0"
4
+edition = "2021"
5
+
6
+# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
7
8
+[dependencies]
rustlang_book/collections/strings/src/main.rs
@@ -0,0 +1,15 @@
+fn main() {
+ let first_message = "Hello ";
+ let second_message = "Rustaceans";
+ let string_one = String::from(first_message);
+ let string_two = second_message.to_string();
9
+ let final_string = string_one + &string_two;
10
+ println!("Final string: {}", final_string);
11
12
+ for character in final_string.chars() {
13
+ println!("{}", character);
14
+ }
15
+}
0 commit comments