W3cubDocs

/Rust

Module std::str

Unicode string slices.

See also the str primitive type.

Modules

pattern [
Experimental
]

The string Pattern API.

Structs

Bytes

External iterator for a string's bytes. Use with the 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

EncodeUtf16

External iterator for a string's UTF-16 code units.

Lines

Created with the method lines().

LinesAny [
Deprecated
]

Created with the method lines_any().

MatchIndices

Created with the method match_indices().

Matches

Created with the method matches().

ParseBoolError

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

RMatchIndices

Created with the method rmatch_indices().

RMatches

Created with the method rmatches().

RSplit

Created with the method rsplit().

RSplitN

Created with the method rsplitn().

RSplitTerminator

Created with the method rsplit_terminator().

Split

Created with the method split().

SplitN

Created with the method splitn().

SplitTerminator

Created with the method split_terminator().

SplitWhitespace

An iterator over the non-whitespace substrings of a string, separated by any amount of whitespace.

Utf8Error

Errors which can occur when attempting to interpret a sequence of u8 as a string.

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.

from_utf8_unchecked

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

© 2010 The Rust Project Developers
Licensed under the Apache License, Version 2.0 or the MIT license, at your option.
https://doc.rust-lang.org/std/str/index.html