PackageTrack
Sign in Get early access

ascii

ASCII-only equivalents to `char`, `str` and `String`.

1.1.0 105M downloads/mo #786 most downloaded on crates.io tomprogrammer/rust-ascii

What this package is like to depend on

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

0 releases in the last 12 months

see the full history below

Release timeline

33 releases · Nov 2014 to Sep 2022
2015 2017 2019 2021 2023 2025
Release Pre-release Withdrawn

Releases

latest 33
  1. 1.1.0 18 Sep 2022
    Release notes
    • Add alloc feature. This enables AsciiString and methods that take or return Box<[AsciiStr]> in !#[no_std]-mode.
    • Add AsciiStr::into_ascii_string(), AsciiString::into_boxed_ascii_str() and AsciiString::insert_str().
    • Implement From<Box<AsciiStr>> and From<AsciiChar> for AsciiString.
    • Implement From<AsciiString> for Box<AsciiStr>, Rc<AsciiStr>, Arc<AsciiStr> and Vec<AsciiChar>.
    • Make AsciiString::new(), AsciiStr::len() and AsciiStr::is_empty() const fn.
    • Require Rust 1.44.1.
    Open source →
  2. 1.0.0 26 Aug 2019
    Release notes

    Breaking changes:

    • Change AsciiChar.is_whitespace() to also return true for '\0xb' (vertical tab) and '\0xc' (form feed).
    • Remove quickcheck feature.
    • Remove AsciiStr::new().
    • Rename AsciiChar::from() and AsciiChar::from_unchecked() to from_ascii() and from_ascii_unchecked().
    • Rename several AsciiChar.is_xxx() methods to is_ascii_xxx() (for comsistency with std).
    • Rename AsciiChar::Null to Nul (for consistency with eg. CStr::from_bytes_with_nul()).
    • Rename AsciiStr.trim_left() and AsciiStr.trim_right() to trim_start() and trim_end().
    • Remove impls of the deprecated std::ascii::AsciiExt trait.
    • Change iterators Chars, CharsMut and CharsRef from type aliases to newtypes.
    • Return impl Trait from AsciiStr.lines() and AsciiStr.split(), and remove iterator types Lines and Split.
    • Add slice_ascii_str(), get_ascii() and unwrap_ascii() to the AsAsciiStr trait.
    • Add slice_mut_ascii_str() and unwrap_ascii_mut() to the AsMutAsciiStr trait.
    • Require Rust 1.33.0 for 1.0.*, and allow later semver-compatible 1.y.0 releases to increase it.

    Additions:

    • Add const fn AsciiChar::new() which panicks on invalid values.
    • Make most AsciiChar methods const fn.
    • Add multiple AsciiChar::is_[ascii_]xxx() methods.
    • Implement AsRef<AsciiStr> for AsciiChar.
    • Make AsciiString's Extend and FromIterator impl generic over all AsRef<AsciiStr>.
    • Implement inclusive range indexing for AsciiStr (and thereby AsciiString).
    • Mark AsciiStr and AsciiString #[repr(transparent)] (to [AsciiChar] and Vec<AsciiChar> respectively).
    Open source →
  3. 0.9.3 26 Aug 2019
    Release notes

    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:

    • Make quickcheck Arbitrary impl sometimes produce AsciiChar::DEL.
    • Implement Clone, Copy and Eq for ToAsciiCharError.
    • Implement ToAsciiChar for u16, u32 and i8.
    Open source →
  4. 0.9.2 07 Jul 2019 withdrawn
    Release notes
    • Implement the IntoAsciiString trait for std::ffi::CStr and std::ffi::CString types, and implemented the AsAsciiStr trait for std::ffi::CStr type.
    • Implement the IntoAsciiString for std::borrow::Cow, where the inner types themselves implement IntoAsciiString.
    • Implement conversions between AsciiString and Cow<'a, AsciiStr>.
    • Implement the std::ops::AddAssign trait for AsciiString.
    • Implement BorrowMut<AsciiStr>, AsRef<[AsciiChar]>, AsRef<str>, AsMut<[AsciiChar]> for AsciiString.
    • Implement PartialEq<[u8]> and PartialEq<[AsciiChar]> for AsciiStr.
    • Add AsciiStr::first(), AsciiStr::last() and AsciiStr::split() methods.
    • Implement DoubleEndedIterator for AsciiStr::lines().
    • Implement AsRef<AsciiStr> and AsMut<AsciiStr for [AsciiChar].
    • Implement Default for AsciiChar.
    Open source →
  5. 0.9.1 12 Sep 2018 withdrawn
    Release notes

    Add fix for AsciiStr::lines() to RELEASES.md

    Open source →
    Release notes
    • Implement the serde::Serialize and serde::Deserialize traits for AsciiChar, AsciiStr, and AsciiString. The implementation is enabled by the serde feature.
    • Bugfix: AsciiStr::lines() now behaves similar to str::lines(). (#51)
    Open source →
  6. 0.9.0 05 Apr 2018 withdrawn
    Release notes
    • Update the optional quickcheck feature to version 0.6.
    Open source →
  7. 0.8.7 05 Apr 2018
    Release notes
    • Implement AsAsciiStr and AsMutAsciiStr for references to to types that implement them.
    • Make all methods of deprecated AsciiExt except is_ascii() available as inherent methods in std-mode.
    • Compile without warnings on Rust 1.26.0
    • Acknowledge that the crate doesn't compile on Rust < 1.8.0 (cannot be fixed without breaking changes).
    Open source →
  8. 0.8.6 02 Jul 2017 withdrawn
    Release notes
    • Implement AsRef<u8> for AsciiString.
    Open source →
  9. 0.8.5 02 Jul 2017 withdrawn

    Nothing published for this version

  10. 0.8.4 18 Apr 2017 withdrawn
    Release notes
    • Fix the tests when running without std.
    Open source →
  11. 0.8.3 18 Apr 2017 withdrawn
    Release notes
    • Bugfix: <AsciiStr as AsciiExt>::to_ascii_lowercase did erroneously convert to uppercase.
    Open source →
  12. 0.8.2 17 Apr 2017 withdrawn
    Release notes
    • Implement IntoAsciiString for &'a str and &'a [u8].
    • Implement the quickcheck::Arbitrary trait for AsciiChar and AsciiString. The implementation is enabled by the quickcheck feature.
    Open source →
  13. 0.8.1 11 Feb 2017 withdrawn
    Release notes
    • Add Chars, CharsMut and Lines iterators.
    • Implement std::fmt::Write for AsciiString.
    Open source →
  14. 0.8.0 02 Jan 2017 withdrawn
    Release notes

    Breaking changes:

    • Return FromAsciiError instead of the input when AsciiString::from_ascii() or into_ascii_string() fails.
    • Replace the 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:

    • Make AsciiChar comparable with char and u8.
    • Add AsciiChar::as_printable_char() and the free functions caret_encode() and caret_decode().
    • Implement some methods from 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()
    Open source →
  15. 0.7.1 15 Aug 2016
    Release notes
    • Fix the implementation of AsciiExt::to_ascii_lowercase() for AsciiChar converting to uppercase. (introduced in 0.7.0)
    Open source →
  16. 0.7.0 25 Jun 2016 withdrawn
    Release notes
    • Rename Ascii to AsciiChar and convert it into an enum. (with a variant for every ASCII character)
    • Replace OwnedAsciiCast with IntoAsciiString.
    • Replace AsciiCast with As[Mut]AsciiStr and IntoAsciiChar.
    • Add from[_ascii]_unchecked methods.
    • Replace from_bytes with from_ascii in method names.
    • Return std::error::Error-implementing types instead of () and None when conversion to AsciiStr or AsciiChar fails.
    • Implement AsciiExt without the unstable Cargo feature flag, which is removed.
    • Require Rust 1.9 or later.
    • Add #[no_std] support in a Cargo feature.
    • Implement From<{&,&mut,Box<}AsciiStr> for [Ascii], [u8] and str
    • Implement From<{&,&mut,Box<}[Ascii]>, As{Ref,Mut}<[Ascii]> and Default for AsciiStr
    • Implement From<Vec<Ascii>> for AsciiString.
    • Implement AsMut<AsciiStr> for AsciiString.
    • Stop some Ascii::is_xxx() methods from panicking.
    • Add Ascii::is_whitespace().
    • Add AsciiString::as_mut_slice().
    • Add raw pointer methods on AsciiString:
      • from_raw_parts
      • as_ptr
      • as_mut_ptr
    Open source →
  17. 0.6.0 30 Dec 2015
    Release notes
    • Add Ascii::from_byte()
    • Add AsciiStr::trim[_{left,right}]()
    Open source →
  18. 0.5.4 29 Jul 2015
    Release notes

    Implement IndexMut for AsciiStr and AsciiString.

    Open source →
  19. 0.5.3 29 Jul 2015

    Nothing published for this version

  20. 0.5.2 16 Jul 2015

    Nothing published for this version

  21. 0.5.1 13 Jun 2015
    Release notes
    • Add Ascii::from().
    • Implement Index for AsciiStr and AsciiString.
    • Implement Default,FromIterator,Extend and Add for AsciiString
    • Added inherent methods on AsciiString:
      • with_capacity
      • push_str
      • capacity
      • reserve
      • reserve_exact
      • shrink_to_fit
      • push
      • truncate
      • pop
      • remove
      • insert
      • len
      • is_empty
      • clear
    Open source →
  22. 0.5.0 05 May 2015
    Release notes

    First release compatible with Rust 1.0.0.

    Open source →
  23. 0.4.1 18 Apr 2015

    Nothing published for this version

  24. 0.4.0 08 Apr 2015

    Nothing published for this version

  25. 0.3.0 07 Apr 2015

    Nothing published for this version

  26. 0.2.5 22 Feb 2015

    Nothing published for this version

  27. 0.2.4 24 Jan 2015

    Nothing published for this version

  28. 0.2.3 11 Jan 2015

    Nothing published for this version

  29. 0.2.2 04 Jan 2015

    Nothing published for this version

  30. 0.2.1 29 Dec 2014

    Nothing published for this version

  31. 0.2.0 16 Dec 2014

    Nothing published for this version

  32. 0.1.0 16 Dec 2014

    Nothing published for this version

  33. 0.0.1 27 Nov 2014

    Nothing published for this version

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive