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 inconsts andstatics.
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_utf8function 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&strparameter, searching in&left[from..]. - ends_
with - A const equivalent of
str::ends_with, taking a&strparameter. - eq_str
- A const equivalent of
&strequality comparison. - find
- A const equivalent of
str::find, taking a&strparameter, searching in&left[from..]. - find_
keep - Advances
thisup to the first instance ofneedle. - find_
skip - Advances
thispast 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&strparameter, searching in&left[..=from]from the end. - rfind
- A const equivalent of
str::rfind, taking a&strparameter, searching in&left[..=from]. - rfind_
keep - Truncates
thisto the last instance ofneedle. - rfind_
skip - Truncates
thisto before the last instance ofneedle. - rsplit
- Const equivalent of
str::rsplit, which only takes a&strdelimiter. - rsplit_
once - A const-equivalent of the
str::rsplit_oncemethod. - rsplit_
terminator - Const equivalent of
str::rsplit_terminator, which only takes a&strdelimiter. - split
- Const equivalent of
str::split, which only takes a&strdelimiter. - split_
at - A const equivalent of
str::split_at - split_
once - A const-equivalent of the
str::split_oncemethod. - split_
terminator - Const equivalent of
str::split_terminator, which only takes a&strdelimiter. - starts_
with - A const equivalent of
str::starts_with, taking a&strparameter. - 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&strpattern. - strip_
suffix - A const subset of
str::strip_suffix, this only takes a&strpattern. - trim
- A const subset of
str::trimwhich only removes ascii whitespace. - trim_
end - A const subset of
str::trim_endwhich only removes ascii whitespace. - trim_
end_ matches - A const subset of
str::trim_end_matcheswhich only takes a&strpattern. - trim_
matches - A const subset of
str::trim_matcheswhich only takes a&strpattern. - trim_
start - A const subset of
str::trim_startwhich only removes ascii whitespace. - trim_
start_ matches - A const subset of
str::trim_start_matcheswhich only takes a&strpattern.