Module core::str [] [src]

Unstable

String manipulation

For more details, see std::str

Modules

pattern [Unstable]

The string Pattern API.

Structs

Bytes

External iterator for a string's bytes. Use with the std::iter`std::iter` module.

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 .lines()`.lines()`.

LinesAny

Created with the method .lines_any()`.lines_any()`.

ParseBoolError

An error returned when parsing a bool`bool` from a string fails.

RSplit

/// Created with the method .rsplit()`.rsplit()`.

RSplitN

/// Created with the method .rsplitn()`.rsplitn()`.

RSplitTerminator

/// Created with the method .rsplit_terminator()`.rsplit_terminator()`.

Split

/// Created with the method .split()`.split()`.

SplitN

/// Created with the method .splitn()`.splitn()`.

SplitTerminator

/// Created with the method .split_terminator()`.split_terminator()`.

Utf8Error

Errors which can occur when attempting to interpret a byte slice as a str`str`.

CharRange [Unstable]

Struct that contains a char`charand the index of the first byte of the next` and the index of the first byte of the next char`char` in a string. This can be used as a data structure for iterating over the UTF-8 bytes of a string.

MatchIndices [Unstable]

/// Created with the method .match_indices()`.match_indices()`.

Matches [Unstable]

/// Created with the method .matches()`.matches()`.

RMatchIndices [Unstable]

/// Created with the method .rmatch_indices()`.rmatch_indices()`.

RMatches [Unstable]

/// Created with the method .rmatches()`.rmatches()`.

Traits

FromStr

A trait to abstract the idea of creating a new instance of a type from a string.

Functions

from_utf8

Converts a slice of bytes to a string slice without performing any allocations.

from_utf8_unchecked

Converts a slice of bytes to a string slice without checking that the string contains valid UTF-8.

char_range_at_raw [Unstable]

Pluck a code point out of a UTF-8-like byte slice and return the index of the next code point.

next_code_point [Unstable]

Reads the next code point out of a byte iterator (assuming a UTF-8-like encoding).

next_code_point_reverse [Unstable]

Reads the last code point out of a byte iterator (assuming a UTF-8-like encoding).