Expand description
const fn
equivalents of str
methods.
Macros§
- 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§
- Const equivalent of
core::str::CharIndices
- Const equivalent of
core::str::Chars
- Const equivalent of
core::iter::Rev<core::str::CharIndices<'_>>
- Const equivalent of
core::iter::Rev<core::str::Chars<'_>>
- Const equivalent of
core::str::RSplit<'a, P>
- Const equivalent of
core::str::RSplitTerminator<'a, P>
- Const equivalent of
core::str::Split<'a, P>
- Const equivalent of
core::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. - Cosnt equivalent of
str::char_indices
. - Cosnt equivalent of
str::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
. - Const equivalent of
str::rsplit
. - A const-equivalent of the
str::rsplit_once
method. - Const equivalent of
str::rsplit_terminator
. - Const equivalent of
str::split
. - A const equivalent of
str::split_at
- A const-equivalent of the
str::split_once
method. - Const equivalent of
str::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
.