Expand description
const fn
equivalents of str
methods.
Re-exports§
pub use deprecated_reexports::*;
Deprecated
Modules§
- deprecated_
reexports Deprecated - Reexports for
0.2.*
patch releases, will be removed in0.3.0
Macros§
- from_
utf8 - A const equivalent of
std::str::from_utf8
, usable *only inconst
s andstatic
s.
Structs§
- RSplit
- Const equivalent of
core::str::RSplit<'a, &'b str>
- RSplit
Terminator - Const equivalent of
core::str::RSplitTerminator<'a, &'b str>
- Split
- Const equivalent of
core::str::Split<'a, &'b str>
- Split
Terminator - Const equivalent of
core::str::SplitTerminator<'a, &'b str>
- Utf8
Error - Error returned by the
from_utf8
function and macro when the input byte slice isn’t valid utf8.
Functions§
- cmp_str
- A const equivalent of
str::cmp
. - contains
- A const equivalent of
str::contains
, taking a&str
parameter, searching in&left[from..]
. - ends_
with - A const equivalent of
str::ends_with
, taking a&str
parameter. - eq_str
- A const equivalent of
&str
equality comparison. - find
- A const equivalent of
str::find
, taking a&str
parameter, searching in&left[from..]
. - find_
keep - Advances
this
up to the first instance ofneedle
. - find_
skip - Advances
this
past the first instance ofneedle
. - from_
utf8 - A const equivalent of
std::str::from_utf8
, requires Rust 1.55 and the"rust_1_55"
feature. - 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)
. - rcontains
- A const equivalent of
str::contains
, taking a&str
parameter, searching in&left[..=from]
from the end. - rfind
- A const equivalent of
str::rfind
, taking a&str
parameter, searching in&left[..=from]
. - rfind_
keep - Truncates
this
to the last instance ofneedle
. - rfind_
skip - Truncates
this
to before the last instance ofneedle
. - rsplit
- Const equivalent of
str::rsplit
, which only takes a&str
delimiter. - rsplit_
once - A const-equivalent of the
str::rsplit_once
method. - rsplit_
terminator - Const equivalent of
str::rsplit_terminator
, which only takes a&str
delimiter. - split
- Const equivalent of
str::split
, which only takes a&str
delimiter. - split_
at - A const equivalent of
str::split_at
- split_
once - A const-equivalent of the
str::split_once
method. - split_
terminator - Const equivalent of
str::split_terminator
, which only takes a&str
delimiter. - starts_
with - A const equivalent of
str::starts_with
, taking a&str
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
, this only takes a&str
pattern. - strip_
suffix - A const subset of
str::strip_suffix
, this only takes a&str
pattern. - 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
which only takes a&str
pattern. - trim_
matches - A const subset of
str::trim_matches
which only takes a&str
pattern. - 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
which only takes a&str
pattern.