Expand description
const fn
equivalents of str
methods.
Macros§
- from_iter
iter
Makes a&'static str
from an const iterator over&str
s orchar
s - Macro equivalent of
<[&str]>::concat
, which takes a constant as an argument. - Macro equivalent of
<[&str]>::join
, which takes constants as arguments.
Structs§
- CharIndices
iter
Const equivalent ofcore::str::CharIndices
- Chars
iter
Const equivalent ofcore::str::Chars
- RCharIndices
iter
Const equivalent ofcore::iter::Rev<core::str::CharIndices<'_>>
- RChars
iter
Const equivalent ofcore::iter::Rev<core::str::Chars<'_>>
- RSplit
iter
Const equivalent ofcore::str::RSplit<'a, P>
- RSplitTerminator
iter
Const equivalent ofcore::str::RSplitTerminator<'a, P>
- Split
iter
Const equivalent ofcore::str::Split<'a, P>
- SplitTerminator
iter
Const equivalent ofcore::str::SplitTerminator<'a, P>
- Wrapper around
core::str::Utf8Error
to provide apanic
method for use inunwrap_ctx
, returned byfrom_utf8
.
Traits§
- A string pattern.
Functions§
- Checks that the start and end are valid utf8 char boundaries when the
"debug"
feature is enabled. - char_indices
iter
Cosnt equivalent ofstr::char_indices
. - chars
iter
Cosnt equivalent ofstr::chars
. - Compares two
Option<&'a str>
, returning the ordering ofleft
relative toright
. - A const equivalent of
str::cmp
. - A const equivalent of
str::contains
, taking aPattern
parameter. - A const equivalent of
str::ends_with
, taking aPattern
parameter. - Compares two
Option<&'a str>
for equality. - A const equivalent of
&str
equality comparison. - Advances
this
up to the first instance ofneedle
. - Advances
this
past the first instance ofneedle
. - Delegates to
core::str::from_utf8
, wrapping the error to provide apanic
method for use inunwrap_ctx
- A const equivalent of
string.get(from..)
. - A const equivalent of
string.get(start..end)
. - A const equivalent of
string.get(..len)
. - Const equivalent of
str::is_char_boundary
. - A const equivalent of
str::contains
, taking aPattern
parameter. - A const equivalent of
str::rfind
, taking aPattern
parameter. - Truncates
this
to the last instance ofneedle
. - Truncates
this
to before the last instance ofneedle
. - rsplit
iter
Const equivalent ofstr::rsplit
. - rsplit_once
iter
A const-equivalent of thestr::rsplit_once
method. - Const equivalent of
str::rsplit_terminator
. - split
iter
Const equivalent ofstr::split
. - A const equivalent of
str::split_at
- split_once
iter
A const-equivalent of thestr::split_once
method. - split_terminator
iter
Const equivalent ofstr::split_terminator
, which only takes a&str
delimiter. - A const equivalent of
str::starts_with
, taking aPattern
parameter. - A const equivalent of
&string[start..]
. - A const equivalent of
&string[start..end]
. - A const equivalent of
&string[..len]
. - A const subset of
str::strip_prefix
. - A const subset of
str::strip_suffix
. - A const subset of
str::trim
which only removes ascii whitespace. - A const subset of
str::trim_end
which only removes ascii whitespace. - A const subset of
str::trim_end_matches
. - A const subset of
str::trim_matches
. - A const subset of
str::trim_start
which only removes ascii whitespace. - A const subset of
str::trim_start_matches
.