diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2015-03-31 16:20:09 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2015-03-31 17:39:24 -0700 |
| commit | 72f59732d7974767650abfc58f8287212e5a1fba (patch) | |
| tree | fbb20c45e460c82a79f86ded0fa59c0ada501c62 /src/libcollections | |
| parent | 50b3ecf3bcc2e39a7a42e7f4b49f19398d5cc681 (diff) | |
| download | rust-72f59732d7974767650abfc58f8287212e5a1fba.tar.gz rust-72f59732d7974767650abfc58f8287212e5a1fba.zip | |
Test fixes and rebase conflicts, round 3
Diffstat (limited to 'src/libcollections')
| -rw-r--r-- | src/libcollections/str.rs | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/src/libcollections/str.rs b/src/libcollections/str.rs index 62a6df71e35..f8f2909291f 100644 --- a/src/libcollections/str.rs +++ b/src/libcollections/str.rs @@ -12,10 +12,10 @@ //! Unicode string manipulation (the `str` type). //! -//! Rust's `str` type is one of the core primitive types of the language. `&str` is the borrowed -//! string type. This type of string can only be created from other strings, unless it is a -//! `&'static str` (see below). It is not possible to move out of borrowed strings because they are -//! owned elsewhere. +//! Rust's `str` type is one of the core primitive types of the language. `&str` +//! is the borrowed string type. This type of string can only be created from +//! other strings, unless it is a `&'static str` (see below). It is not possible +//! to move out of borrowed strings because they are owned elsewhere. //! //! # Examples //! @@ -25,8 +25,9 @@ //! let s = "Hello, world."; //! ``` //! -//! This `&str` is a `&'static str`, which is the type of string literals. They're `'static` -//! because literals are available for the entire lifetime of the program. +//! This `&str` is a `&'static str`, which is the type of string literals. +//! They're `'static` because literals are available for the entire lifetime of +//! the program. //! //! You can get a non-`'static` `&str` by taking a slice of a `String`: //! @@ -37,12 +38,13 @@ //! //! # Representation //! -//! Rust's string type, `str`, is a sequence of Unicode scalar values encoded as a stream of UTF-8 -//! bytes. All [strings](../../reference.html#literals) are guaranteed to be validly encoded UTF-8 -//! sequences. Additionally, strings are not null-terminated and can thus contain null bytes. +//! Rust's string type, `str`, is a sequence of Unicode scalar values encoded as +//! a stream of UTF-8 bytes. All [strings](../../reference.html#literals) are +//! guaranteed to be validly encoded UTF-8 sequences. Additionally, strings are +//! not null-terminated and can thus contain null bytes. //! -//! The actual representation of `str`s have direct mappings to slices: `&str` is the same as -//! `&[u8]`. +//! The actual representation of `str`s have direct mappings to slices: `&str` +//! is the same as `&[u8]`. #![doc(primitive = "str")] #![stable(feature = "rust1", since = "1.0.0")] |
