Expand description
const fn
equivalents of slice methods.
§Removed in 0.3.0
These functions were removed in 0.3.0 because there is an equivalent const fn in the standard library:
first
last
split_first
split_last
Macros§
- slice_
concat - Macro equivalent of
<[&[T]]>::concat
, which takes a constant as an argument.
Structs§
- TryInto
Array Error - The error produced by trying to convert from
&[T]
to&[T; N]
, or from&mut [T]
to&mut [T; N]
.
Traits§
- Bytes
Pattern - A byte slice pattern.
Functions§
- as_
chunks - Const equivalent of
<[T]>::as_chunks
- as_
rchunks - Const equivalent of
<[T]>::as_rchunks
- bytes_
contain - Whether
pattern
is insideleft
. - bytes_
end_ with - Whether
pattern
is the end ofleft
. - bytes_
find - Finds the byte offset of
pattern
inleft
. - bytes_
find_ keep - Advances
this
up to the first instance ofneedle
. - bytes_
find_ skip - Advances
this
past the first instance ofneedle
. - bytes_
rcontain - Returns whether
pattern
is contained insideleft
, searching in reverse. - bytes_
rfind - Finds the byte offset of
pattern
insideleft
, searching in reverse. - bytes_
rfind_ keep - Truncates
this
to the last instance ofneedle
. - bytes_
rfind_ skip - Truncates
this
to before the last instance ofneedle
. - bytes_
start_ with - Whether
pattern
is the start ofleft
. - bytes_
strip_ prefix - Remove
prefix
from the start ofleft
. - bytes_
strip_ suffix - Remove
suffix
from the end ofleft
. - bytes_
trim - Removes ascii whitespace from the start and end of
this
. - bytes_
trim_ end - Removes ascii whitespace from the end of
this
. - bytes_
trim_ end_ matches - Removes all instances of
needle
from the end ofthis
. - bytes_
trim_ matches - Removes all instances of
needle
from the start and end ofthis
. - bytes_
trim_ start - Removes ascii whitespace from the start of
this
. - bytes_
trim_ start_ matches - Removes all instances of
needle
from the start ofthis
. - cmp_
bytes - Compares two
&[u8]
, returning the order ofleft
relative toright
. - cmp_
option_ bytes - Compares two
Option<&'a [u8]>
, returning the ordering ofleft
relative toright
. - eq_
bytes - Compares two
&[u8]
for equality. - eq_
option_ bytes - Compares two
Option<&'a [u8]>
for equality. - get
- A const equivalent of
slice.get(index)
- get_
from - A const equivalent of
slice.get(start..)
. - get_
range - A const equivalent of
slice.get(start..end)
. - get_
up_ to - A const equivalent of
slice.get(..len)
. - slice_
from - A const equivalent of
&slice[start..]
. - slice_
range - A const equivalent of
&slice[start..end]
. - slice_
up_ to - A const equivalent of
&slice[..len]
. - split_
at - A const equivalent of
<[T]>::split_at
- try_
into_ array - Tries to convert from
&[T]
to&[T; N]
.