odds
odds copied to clipboard
Odds and ends — collection miscellania. Extra functionality for slices, strings and other things
odds
Odds and ends — collection miscellania. Extra functionality related to slices, strings and other things.
Please read the API documentation here__
__ https://docs.rs/odds/
|build_status|_ |crates|_
.. |build_status| image:: https://travis-ci.org/bluss/odds.svg .. _build_status: https://travis-ci.org/bluss/odds
.. |crates| image:: http://meritbadge.herokuapp.com/odds .. _crates: https://crates.io/crates/odds
Recent Changes
-
0.4.0
- Remove MendSlices
- Remove deprecated items
- Updated rawpointer dependency
- Updated dev-dependencies
-
0.3.1
- Go back to the 0.2.x formulation of the
fixfunction, 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.
- Go back to the 0.2.x formulation of the
-
0.3.0
-
Update the
fixandFixclosure combinator to not use dynamic dispatch! new formulation was an idea by @talchas -
Implement Error for
EncodeUtf8Errorby George Burton -
Depend on crate
rawslicefor itsSliceIter. -
More features for
SliceIterandSliceCopyIter: access start/end pointer, implementIndex. -
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:
String::insert_strstr::repptr_eq,ref_eq: usestd::ptr::eq
-
Deprecate functionality that has moved:
get_unchecked,slice_unchecked: useunchecked-indexcrate instead
-
Vec functionality is now opt-in under feature
std-vec. String functionality the same understd-string. The crate is nowno_stdby default. -
Proper license files added to the repo, thanks @raphlinus!
-
-
0.2.26
- Proper license files by @raphlinus
-
0.2.25
- Add
UnalignedIter - Add
SliceCopyIter CharStrnow implements more traits.
- Add
-
0.2.24
- Add
CharStr
- Add
-
0.2.23
- Add
RevSlice, a reversed view of a slice - Add
encode_utf8for encoding chars
- Add
-
0.2.22
- Improve slice's
.find()and.rfind()and related methods by explicitly unrolling their search loop.
- Improve slice's
-
0.2.21
- Add
slice::rotate_leftto cyclically rotate elements in a slice.
- Add
-
0.2.20
- Add
SliceFindSplitwith.find_split, .rfind_split, .find_split_mut,.rfind_split_mut. - Add
VecFindRemovewith.find_remove(), .rfind_remove().
- Add
-
0.2.19
- Add trait
SliceFindwith methods.find(&T), .rfind(&T)for slices. - Add function
vec(iterable) -> Vec - Add prelude module
- Add trait
-
0.2.18
- Correct
split_aligned_for<T>to use the trait bound.
- Correct
-
0.2.17
- 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]. WhereTis a pod type like for exampleu64. - Add
Stride, StrideMutthat moved here from itertools - Add
mend_slicesiterator extension that moved here from itertools
- Add
-
0.2.16
- Add
fixfunction that makes it much easier to use theFixcombinator. Type inference works much better for the closure this way.
- Add
-
0.2.15
- Add
std::slice::shared_prefixto efficiently compute the shared prefix of two byte slices - Add str extension methods
.char_chunks(n)andchar_windows(n)that are iterators that do the char-wise equivalent of slice's chunks and windows iterators.
- Add
-
0.2.14
- Fix
get_sliceto checkstart <= endas well.
- Fix
-
0.2.13
- Add extension trait
StrSlicewith methodget_slicethat is a slicing method that returns an optional slice.
- Add extension trait
-
0.2.12
- Add default feature "std". odds uses
no_stdif you opt out of this feature.
- Add default feature "std". odds uses
-
0.2.11
- Add type parameter to
IndexRange(that defaults tousize, so that it's non-breaking). - Drop dep on
unreachable(provided in a simpler implementation locally).
- Add type parameter to
-
0.2.10
- Fix feature flags when using cargo feature
unstable
- Fix feature flags when using cargo feature
-
0.2.9
- Add
slice_unchecked_mut - Add
ref_slice,ref_slice_mut
- Add
-
0.2.8
- Add
VecExt::retain_mut
- Add
-
0.2.7
inline(always)ondebug_assert_unreachable
-
0.2.6
- Add lifetime bounds for Fix for well-formedness (Rust RFC 1214)
- Add
StrExt::is_acceptable_index
-
0.2.5
- Add
StringExt::insert_strandVecExt::splice
- Add
-
0.2.4
- Add
odds::string::StrExt, extensions to&str.
- Add
-
0.2.3
- Add default for Fix so that
Fix<T> == Fix<T, T>
- Add default for Fix so that
-
0.2.2
- Add ptr_eq, ref_eq
-
0.2.1
- Add slice_unchecked
-
0.2.0
- Removed Void, see
voidcrate instead.
- Removed Void, see
License
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.