Expand description
Utilities for the str primitive type.
Modules§
- pattern
Experimental  - The string Pattern API.
 
Structs§
- Bytes
 - An iterator over the bytes of a string slice.
 - Char
Indices  - An iterator over the 
chars of a string slice, and their positions. - Chars
 - An iterator over the 
chars of a string slice. - Encode
Utf16  - An iterator of 
u16over the string encoded as UTF-16. - Escape
Debug  - The return type of 
str::escape_debug. - Escape
Default  - The return type of 
str::escape_default. - Escape
Unicode  - The return type of 
str::escape_unicode. - Lines
 - An iterator over the lines of a string, as string slices.
 - Lines
Any Deprecated  - Created with the method 
lines_any. - Match
Indices  - Created with the method 
match_indices. - Matches
 - Created with the method 
matches. - Parse
Bool Error  - An error returned when parsing a 
boolusingfrom_strfails - RMatch
Indices  - Created with the method 
rmatch_indices. - RMatches
 - Created with the method 
rmatches. - RSplit
 - Created with the method 
rsplit. - RSplitN
 - Created with the method 
rsplitn. - RSplit
Terminator  - Created with the method 
rsplit_terminator. - Split
 - Created with the method 
split. - Split
Ascii Whitespace  - An iterator over the non-ASCII-whitespace substrings of a string, separated by any amount of ASCII whitespace.
 - Split
Inclusive  - An iterator over the substrings of a string,
terminated by a substring matching to a predicate function
Unlike 
Split, it contains the matched part as a terminator of the subslice. - SplitN
 - Created with the method 
splitn. - Split
Terminator  - Created with the method 
split_terminator. - Split
Whitespace  - An iterator over the non-whitespace substrings of a string, separated by any amount of whitespace.
 - Utf8
Chunk  - An item returned by the 
Utf8Chunksiterator. - Utf8
Chunks  - An iterator used to decode a slice of mostly UTF-8 bytes to string slices
(
&str) and byte slices (&[u8]). - Utf8
Error  - Errors which can occur when attempting to interpret a sequence of 
u8as a string. 
Traits§
- FromStr
 - Parse a value from a string
 
Functions§
- from_
boxed_ ⚠utf8_ unchecked  - Converts a boxed slice of bytes to a boxed string slice without checking that the string contains valid UTF-8.
 - from_
utf8  - Converts a slice of bytes to a string slice.
 - from_
utf8_ mut  - Converts a mutable slice of bytes to a mutable string slice.
 - from_
utf8_ ⚠unchecked  - Converts a slice of bytes to a string slice without checking that the string contains valid UTF-8.
 - from_
utf8_ ⚠unchecked_ mut  - Converts a slice of bytes to a string slice without checking that the string contains valid UTF-8; mutable version.
 - from_
raw_ ⚠parts Experimental  - Creates a 
&strfrom a pointer and a length. - from_
raw_ ⚠parts_ mut Experimental  - Creates a 
&mut strfrom a pointer and a length.