Module core::str
[−]
[src]
String manipulation
For more details, see std::str
Reexports
use self::pattern::Pattern; |
use self::pattern::{Searcher, ReverseSearcher, DoubleEndedSearcher}; |
use char::{self, CharExt}; |
use clone::Clone; |
use cmp::Eq; |
use convert::AsRef; |
use default::Default; |
use fmt; |
use iter::ExactSizeIterator; |
use iter::{Map, Cloned, Iterator, DoubleEndedIterator}; |
use marker::Sized; |
use mem; |
use ops::{Fn, FnMut, FnOnce}; |
use option::Option::{self, None, Some}; |
use raw::{Repr, Slice}; |
use result::Result::{self, Ok, Err}; |
use slice::{self, SliceExt}; |
Modules
pattern |
[Unstable] The string Pattern API. |
traits |
Structs
Bytes |
External iterator for a string's bytes.
Use with the |
CharIndices |
Iterator for a string's characters and their byte offsets. |
Chars |
Iterator for the char (representing Unicode Scalar Values) of a string |
Lines |
Created with the method [ |
LinesAny |
[Deprecated] Created with the method [ |
LinesAnyMap |
A nameable, cloneable fn type |
MatchIndices |
Created with the method [ |
MatchIndicesInternal | |
Matches |
Created with the method [ |
MatchesInternal | |
ParseBoolError |
An error returned when parsing a |
RMatchIndices |
Created with the method [ |
RMatches |
Created with the method [ |
RSplit |
Created with the method [ |
RSplitN |
Created with the method [ |
RSplitTerminator |
Created with the method [ |
Split |
Created with the method [ |
CharRange |
[Unstable] Struct that contains a |
SplitInternal | |
SplitN |
Created with the method [ |
SplitNInternal | |
SplitTerminator |
Created with the method [ |
Utf8Error |
Errors which can occur when attempting to interpret a sequence of |
Constants
CONT_MASK |
Mask of the value bits of a continuation byte |
NONASCII_MASK | |
TAG_CONT_U8 |
Value of the tag bits (tag mask is !CONT_MASK) of a continuation byte |
Statics
UTF8_CHAR_WIDTH |
Traits
FromStr |
A trait to abstract the idea of creating a new instance of a type from a string. |
StrExt |
[Unstable] Methods for string slices |
Functions
char_range_at_raw |
Pluck a code point out of a UTF-8-like byte slice and return the index of the next code point. |
cmp_slice |
Bytewise slice comparison. NOTE: This uses the system's memcmp, which is currently dramatically faster than comparing each byte in a loop. |
contains_nonascii |
Return |
eq_slice |
Bytewise slice equality NOTE: This function is (ab)used in rustc::middle::trans::_match to compare &[u8] byte slices that are not necessarily valid UTF-8. |
from_raw_parts_mut |
Forms a str from a pointer and a length. |
from_utf8 |
Converts a slice of bytes to a string slice. |
from_utf8_unchecked |
Converts a slice of bytes to a string slice without checking that the string contains valid UTF-8. |
next_code_point |
[Unstable] Reads the next code point out of a byte iterator (assuming a UTF-8-like encoding). |
next_code_point_reverse |
Reads the last code point out of a byte iterator (assuming a UTF-8-like encoding). |
run_utf8_validation |
Walk through |
slice_error_fail | |
unwrap_or_0 | |
utf8_acc_cont_byte |
Return the value of |
utf8_first_byte |
Return the initial codepoint accumulator for the first byte. The first byte is special, only want bottom 5 bits for width 2, 4 bits for width 3, and 3 bits for width 4. |
utf8_is_cont_byte |
Checks whether the byte is a UTF-8 continuation byte (i.e. starts with the
bits |