NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
crates.io · #808 most downloaded on crates.io
ASCII-only equivalents to `char`, `str` and `String`.
Last release 4 years ago
no release in 18 months
Ships unpredictably
gaps range from 6 weeks to 3.1 years
Some releases are documented
notes for 9 of 22 stable releases
11 versions withdrawn
withdrawn after publishing
12 years old
33 releases · first in 2014
Add alloc feature. This enables AsciiString and methods that take or return Box<[AsciiStr]> in !#[no_std]-mode.
AsciiString and methods that take or return Box<[AsciiStr]> in !#[no_std]-mode.AsciiStr::into_ascii_string(), AsciiString::into_boxed_ascii_str() and AsciiString::insert_str().From<Box<AsciiStr>> and From<AsciiChar> for AsciiString.From<AsciiString> for Box<AsciiStr>, Rc<AsciiStr>, Arc<AsciiStr> and Vec<AsciiChar>.AsciiString::new(), AsciiStr::len() and AsciiStr::is_empty() const fn.Remove impls of the deprecated std::AsciiExt trait.
Breaking changes:
AsciiChar.is_whitespace() to also return true for '\0xb' (vertical tab) and '\0xc' (form feed).AsciiStr::new().AsciiChar::from() and AsciiChar::from_unchecked() to from_ascii() and from_ascii_unchecked().AsciiChar.is_xxx() methods to is_ascii_xxx() (for comsistency with std).AsciiChar::Null to Nul (for consistency with eg. CStr::from_bytes_with_nul()).AsciiStr.trim_left() and AsciiStr.trim_right() to trim_start() and trim_end().std::ascii::AsciiExt trait.Chars, CharsMut and CharsRef from type aliases to newtypes.impl Trait from AsciiStr.lines() and AsciiStr.split(), and remove iterator types Lines and Split.slice_ascii_str(), get_ascii() and unwrap_ascii() to the AsAsciiStr trait.slice_mut_ascii_str() and unwrap_ascii_mut() to the AsMutAsciiStr trait.Additions:
const fn AsciiChar::new() which panicks on invalid values.AsciiChar methods const fn.AsciiChar::is_[ascii_]xxx() methods.AsRef<AsciiStr> for AsciiChar.AsciiString's Extend and FromIterator impl generic over all AsRef<AsciiStr>.AsciiStr (and thereby AsciiString).AsciiStr and AsciiString #[repr(transparent)] (to [AsciiChar] and Vec<AsciiChar> respectively).One column per quarter.
Remove unsound impls of From<&mut AsciiStr> for &mut [u8] and &mut str. This is a breaking change, but theese impls can lead to undefined behavior in…
Soundness fix:
Remove unsound impls of From<&mut AsciiStr> for &mut [u8] and &mut str.
This is a breaking change, but theese impls can lead to undefined behavior in safe code.
If you use this impl and know that non-ASCII values are never inserted into the [u8] or str,
you can pin ascii to 0.9.2.
Other changes:
Arbitrary impl sometimes produce AsciiChar::DEL.Clone, Copy and Eq for ToAsciiCharError.ToAsciiChar for u16, u32 and i8.Implement the IntoAsciiString trait for std::CStr and std::CString types, and implemented the AsAsciiStr trait for std::CStr type.
IntoAsciiString trait for std::ffi::CStr and std::ffi::CString types,
and implemented the AsAsciiStr trait for std::ffi::CStr type.IntoAsciiString for std::borrow::Cow, where the inner types themselves
implement IntoAsciiString.AsciiString and Cow<'a, AsciiStr>.std::ops::AddAssign trait for AsciiString.BorrowMut<AsciiStr>, AsRef<[AsciiChar]>, AsRef<str>, AsMut<[AsciiChar]> for AsciiString.PartialEq<[u8]> and PartialEq<[AsciiChar]> for AsciiStr.AsciiStr::first(), AsciiStr::last() and AsciiStr::split() methods.DoubleEndedIterator for AsciiStr::lines().AsRef<AsciiStr> and AsMut<AsciiStr for [AsciiChar].Default for AsciiChar.Add fix for AsciiStr::lines() to RELEASES.md
Add fix for AsciiStr::lines() to RELEASES.md
serde::Serialize and serde::Deserialize traits for AsciiChar, AsciiStr, and AsciiString.
The implementation is enabled by the serde feature.AsciiStr::lines() now behaves similar to str::lines().
(#51)Update the optional quickcheck feature to version 0.6.
quickcheck feature to version 0.6.Acknowledge that the crate doesn't compile on Rust < 1.8.0 (cannot be fixed without breaking changes).
AsAsciiStr and AsMutAsciiStr for references to to types that implement them.AsciiExt except is_ascii() available as inherent methods in std-mode.Implement AsRef for AsciiString.
AsRef<u8> for AsciiString.Nothing published for this version
Fix the tests when running without std.
Bugfix: ::to_ascii_lowercase did erroneously convert to uppercase.
<AsciiStr as AsciiExt>::to_ascii_lowercase did erroneously convert to uppercase.Implement IntoAsciiString for &'a str and &'a [u8].
IntoAsciiString for &'a str and &'a [u8].quickcheck::Arbitrary trait for AsciiChar and AsciiString.
The implementation is enabled by the quickcheck feature.Add Chars, CharsMut and Lines iterators.
Chars, CharsMut and Lines iterators.std::fmt::Write for AsciiString.Return FromAsciiError instead of the input when AsciiString::from_ascii() or into_ascii_string() fails.
Breaking changes:
FromAsciiError instead of the input when AsciiString::from_ascii() or into_ascii_string() fails.no_std feature with the additive std feature, which is part of the default features. (Issue #29)AsciiChar::is_*() and ::as_{byte,char}() take self by value instead of by reference.Additions:
AsciiChar comparable with char and u8.AsciiChar::as_printable_char() and the free functions caret_encode() and caret_decode().AsciiExt and Error (which are not in libcore) directly in core mode:
Ascii{Char,Str}::eq_ignore_ascii_case()AsciiChar::to_ascii_{upper,lower}case()AsciiStr::make_ascii_{upper,lower}case(){ToAsciiChar,AsAsciiStr}Error::description()Fix the implementation of AsciiExt::to_ascii_lowercase() for AsciiChar converting to uppercase. (introduced in 0.7.0)
AsciiExt::to_ascii_lowercase() for AsciiChar converting to uppercase. (introduced in 0.7.0)Rename Ascii to AsciiChar and convert it into an enum. (with a variant for every ASCII character)
Ascii to AsciiChar and convert it into an enum.
(with a variant for every ASCII character)OwnedAsciiCast with IntoAsciiString.AsciiCast with As[Mut]AsciiStr and IntoAsciiChar.std::error::Error-implementing types instead of () and None when
conversion to AsciiStr or AsciiChar fails.AsciiExt without the unstable Cargo feature flag, which is removed.#[no_std] support in a Cargo feature.From<{&,&mut,Box<}AsciiStr> for [Ascii], [u8] and strFrom<{&,&mut,Box<}[Ascii]>, As{Ref,Mut}<[Ascii]> and Default for AsciiStrFrom<Vec<Ascii>> for AsciiString.AsMut<AsciiStr> for AsciiString.Ascii::is_xxx() methods from panicking.Ascii::is_whitespace().AsciiString::as_mut_slice().AsciiString:
from_raw_partsas_ptras_mut_ptrAdd AsciiStr::trim[_{left,right}]()
Ascii::from_byte()AsciiStr::trim[_{left,right}]()Implement IndexMut for AsciiStr and AsciiString.
Implement IndexMut for AsciiStr and AsciiString.
Nothing published for this version
Nothing published for this version
Implement Index for AsciiStr and AsciiString.
Ascii::from().Index for AsciiStr and AsciiString.Default,FromIterator,Extend and Add for AsciiStringAsciiString:
with_capacitypush_strcapacityreservereserve_exactshrink_to_fitpushtruncatepopremoveinsertlenis_emptyclearFirst release compatible with Rust 1.0.0.
First release compatible with Rust 1.0.0.
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →