Skip to content

Commit

Permalink
README
Browse files Browse the repository at this point in the history
  • Loading branch information
krishpranav committed Nov 7, 2021
1 parent ae39572 commit de4d311
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions strings/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
## Strings:

- main.rs

- basic strings
```rust
fn main() {
/* string */
let company:&str = "CompanyOne";
let location:&str = "Some where in the world";

println!("company name: {} location: {}", company, location);
}
```

- illustration
```rust
fn main() {
/* store names inside name */
let mut name = String::new();
name.push_str("NameOne");
name.push_str("NameTwo");

println!("{}", name);
}
```

```
$ cargo run
```

0 comments on commit de4d311

Please sign in to comment.