Expand description
const fn
equivalents of str
methods.
Macros§
- str_
concat - Macro equivalent of
<[&str]>::concat
, which takes a constant as an argument. - str_
join - Macro equivalent of
<[&str]>::join
, which takes constants as arguments.
Structs§
- Utf8
Error - Wrapper around
core::str::Utf8Error
to provide apanic
method for use inunwrap_ctx
, returned byfrom_utf8
.
Traits§
- Pattern
- A string pattern.
Functions§
- __
from_ ⚠u8_ subslice_ of_ str - Checks that the start and end are valid utf8 char boundaries
when the
"debug"
feature is enabled. - cmp_str
- A const equivalent of
str::cmp
. - contains
- A const equivalent of
str::contains
, taking aPattern
parameter. - ends_
with - A const equivalent of
str::ends_with
, taking aPattern
parameter. - eq_str
- A const equivalent of
&str
equality comparison. - find
- A const equivalent of
str::find
, taking aPattern
parameter. - find_
keep - Advances
this
up to the first instance ofneedle
. - find_
skip - Advances
this
past the first instance ofneedle
. - from_
utf8 - Delegates to
core::str::from_utf8
, wrapping the error to provide apanic
method for use inunwrap_ctx
- get_
from - A const equivalent of
string.get(from..)
. - get_
range - A const equivalent of
string.get(start..end)
. - get_
up_ to - A const equivalent of
string.get(..len)
. - is_
char_ boundary - Const equivalent of
str::is_char_boundary
. - rcontains
- A const equivalent of
str::contains
, taking aPattern
parameter. - rfind
- A const equivalent of
str::rfind
, taking aPattern
parameter. - rfind_
keep - Truncates
this
to the last instance ofneedle
. - rfind_
skip - Truncates
this
to before the last instance ofneedle
. - rsplit_
once - A const-equivalent of the
str::rsplit_once
method. - split_
at - A const equivalent of
str::split_at
- split_
once - A const-equivalent of the
str::split_once
method. - starts_
with - A const equivalent of
str::starts_with
, taking aPattern
parameter. - str_
from - A const equivalent of
&string[start..]
. - str_
range - A const equivalent of
&string[start..end]
. - str_
up_ to - A const equivalent of
&string[..len]
. - strip_
prefix - A const subset of
str::strip_prefix
. - strip_
suffix - A const subset of
str::strip_suffix
. - trim
- A const subset of
str::trim
which only removes ascii whitespace. - trim_
end - A const subset of
str::trim_end
which only removes ascii whitespace. - trim_
end_ matches - A const subset of
str::trim_end_matches
. - trim_
matches - A const subset of
str::trim_matches
. - trim_
start - A const subset of
str::trim_start
which only removes ascii whitespace. - trim_
start_ matches - A const subset of
str::trim_start_matches
.