Storing UTF-8 Encoded Text with Strings - The Rust Programming Language
We talked about strings in Chapter 4, but we’ll look at them in more depth now. New Rustaceans commonly get stuck on strings for a combination of three reasons: Rust’s propensity for exposing possible errors, strings being a more complicated data structure than many programmers give them credit for, and UTF-8. These factors combine in a way that can seem difficult when you’re coming from other programming languages. We discuss strings in the context of collections because strings are implemented as a collection of bytes, plus some methods to provide useful functionality when those bytes are interpreted as text. In this section, we’ll talk about the operations on String that every collection type has, such as creating, updating, and reading. We’ll also discuss the ways in which String is different from the other collections, namely, how indexing into a String is complicated by the differences between how people and computers interpret String data. We’ll first define what we mean by the
Storing UTF-8 Encoded Text with Strings - The Rust Programming Language Keyboard shortcuts Press ← or → to navigate between chapters Press S or / to search in the book Press ? to show this help Press Esc to hide this help Auto Light Rust Coal Navy Ayu The Rust Programming Language Storing UTF-8 Encoded Text with Strings We talked about strings in Chapter 4, but we’ll look at them in more depth now. New Rustaceans commonly get stuck on strings for a combination of three reasons: Rust’s propensity for exposing possible errors, strings being a more complicated data structure than many programmers
Explore this link on the map →saved by
related reading
- The Slice Type - The Rust Programming Languagedoc.rust-lang.org
- Working with strings in Rustfasterthanli.me
- Item 7: Use builders for complex types - Effective Rustlurklurk.org
- Reddit - Please wait for verificationreddit.com
- Fearless Concurrency - The Rust Programming Languagedoc.rust-lang.org
- References and Borrowing - The Rust Programming Languagedoc.rust-lang.org
- A half-hour to learn Rustfasterthanli.me
- Rust Language Cheat Sheetcheats.rs
- What is Ownership? - The Rust Programming Languagedoc.rust-lang.org
- Storing Lists of Values with Vectors - The Rust Programming Languagedoc.rust-lang.org
- Data Types - The Rust Programming Languagedoc.rust-lang.org
- The Absolute Minimum Every Software Developer Absolutely, Positively Must Know About Unicode and Character Sets (No Excuses!) – Joel on Softwarejoelonsoftware.com