|0.3.1||Nov 27, 2017|
|0.2.26||Nov 19, 2017|
|0.2.25||Nov 20, 2016|
|0.2.14||May 14, 2016|
|0.2.3||Jun 12, 2015|
#12 in No standard library
14,233 downloads per month
Used in 108 crates (9 directly)
Odds and ends — collection miscellania. Extra functionality related to slices, strings and other things.
Please read the API documentation here
- Go back to the 0.2.x formulation of the fix function, because the new fancy version relied on a type system detail that has been changed in Rust — closures must not be able to use their own type in their arguments. Fair enough.
- Update the fix and Fix closure combinator to not use dynamic dispatch! new formulation was an idea by @talchas
- Implement Error for EncodeUtf8Error by George Burton
- Depend on crate rawslice for its SliceIter.
- More features for SliceIter and SliceCopyIter: access start/end pointer, implement Index.
- Add BlockedIter
- Remove functionality that is unused or directly conflicts with other
new features, for example in std:
- Vec::splice. Use the std splice.
- Deprecate functionality that has been added to std:
- ptr_eq, ref_eq: use std::ptr::eq
- Deprecate functionality that has moved:
- get_unchecked, slice_unchecked: use unchecked-index crate instead
- Vec functionality is now opt-in under feature std-vec. String functionality the same under std-string. The crate is now no_std by default.
- Proper license files added to the repo, thanks @raphlinus!
- Proper license files by @raphlinus
- Add UnalignedIter
- Add SliceCopyIter
- CharStr now implements more traits.
- Add CharStr
- Add RevSlice, a reversed view of a slice
- Add encode_utf8 for encoding chars
- Improve slice's .find() and .rfind() and related methods by explicitly unrolling their search loop.
- Add slice::rotate_left to cyclically rotate elements in a slice.
- Add SliceFindSplit with .find_split, .rfind_split, .find_split_mut, .rfind_split_mut.
- Add VecFindRemove with .find_remove(), .rfind_remove().
- Add trait SliceFind with methods .find(&T), .rfind(&T) for slices.
- Add function vec(iterable) -> Vec
- Add prelude module
- Correct split_aligned_for<T> to use the trait bound.
- Add split_aligned_for<T> function that splits a byte slice into head and tail slices and a main slice that is a well aligned block of type &[T]. Where T is a pod type like for example u64.
- Add Stride, StrideMut that moved here from itertools
- Add mend_slices iterator extension that moved here from itertools
- Add fix function that makes it much easier to use the Fix combinator. Type inference works much better for the closure this way.
- Add std::slice::shared_prefix to efficiently compute the shared prefix of two byte slices
- Add str extension methods .char_chunks(n) and char_windows(n) that are iterators that do the char-wise equivalent of slice's chunks and windows iterators.
- Fix get_slice to check start <= end as well.
- Add extension trait StrSlice with method get_slice that is a slicing method that returns an optional slice.
- Add default feature "std". odds uses no_std if you opt out of this feature.
- Add type parameter to IndexRange (that defaults to usize, so that it's non-breaking).
- Drop dep on unreachable (provided in a simpler implementation locally).
- Fix feature flags when using cargo feature unstable
- Add slice_unchecked_mut
- Add ref_slice, ref_slice_mut
- Add VecExt::retain_mut
- inline(always) on debug_assert_unreachable
- Add lifetime bounds for Fix for well-formedness (Rust RFC 1214)
- Add StrExt::is_acceptable_index
- Add StringExt::insert_str and VecExt::splice
- Add odds::string::StrExt, extensions to &str.
- Add default for Fix so that Fix<T> == Fix<T, T>
- Add ptr_eq, ref_eq
- Add slice_unchecked
- Removed Void, see void crate instead.
Dual-licensed to be compatible with the Rust project.
Licensed under the Apache License, Version 2.0 http://www.apache.org/licenses/LICENSE-2.0 or the MIT license http://opensource.org/licenses/MIT, at your option. This file may not be copied, modified, or distributed except according to those terms.