Rust by Example: Strings
In Rust there are two main types of strings: string slices ( |
|
|
|
String slice is an immutable reference to a UTF-8 encoded string in memory
that is not owned by the program. String slices are written as |
|
String literal, fixed size and immutable string slice, and are stored in
the program's binary as immutable data. Therefore, string literals are
considered string slices ( |
|
|
|
Create |
|
Create |
|
Create |
|
|