summary refs log tree commit diff
path: root/src/libstd/ascii.rs
AgeCommit message (Collapse)AuthorLines
2017-04-09Reduce str transmutes, add mut versions of methods.Clar Charr-3/+2
2017-04-01Add more std::ascii module-level docs.Eugene Bulkin-0/+14
2017-04-01Clean up std::ascii sub-level docs.Eugene Bulkin-8/+44
* Change `utf8` variable names to `non_ascii` to be more clear, since ASCII and UTF-8 are compatible. * Fix `EscapeDefault` struct description to follow the typical iterator method format with a link to the generating function. * Add more `escape_default` examples to cover every case mentioned in the function description itself.
2017-03-27Fixed spelling mistakesAlan Stoate-2/+2
2017-03-26change string references in asciiext r? @steveklabnikaStoate-9/+15
2017-02-13Add feature annotations to the doctests for ascii_ctype.Zack Weinberg-0/+20
2017-02-13Squeeze URL lines under 100 chars wide to make tidy happy.Zack Weinberg-7/+7
2017-02-08Add equivalents of C's <ctype.h> functions to AsciiExt.Zack Weinberg-0/+838
* `is_ascii_alphabetic` * `is_ascii_uppercase` * `is_ascii_lowercase` * `is_ascii_alphanumeric` * `is_ascii_digit` * `is_ascii_hexdigit` * `is_ascii_punctuation` * `is_ascii_graphic` * `is_ascii_whitespace` * `is_ascii_control` This addresses issue #39658.
2017-01-29Fix a few impl stability attributesOliver Middleton-1/+1
The versions show up in rustdoc.
2017-01-22Add more references between lowercase/uppercase operations.Corey Farwell-2/+30
2016-12-18Implement `fmt::Debug` for all structures in libstd.Corey Farwell-0/+8
Part of https://github.com/rust-lang/rust/issues/31869. Also turn on the `missing_debug_implementations` lint at the crate level.
2016-08-24Use `#[prelude_import]` in `libstd`.Jeffrey Seyfried-3/+0
2016-08-18Add a FusedIterator trait.Steven Allen-0/+4
This trait can be used to avoid the overhead of a fuse wrapper when an iterator is already well-behaved. Conforming to: RFC 1581 Closes: #35602
2016-04-11std: Stabilize APIs for the 1.9 releaseAlex Crichton-6/+2
This commit applies all stabilizations, renamings, and deprecations that the library team has decided on for the upcoming 1.9 release. All tracking issues have gone through a cycle-long "final comment period" and the specific APIs stabilized/deprecated are: Stable * `std::panic` * `std::panic::catch_unwind` (renamed from `recover`) * `std::panic::resume_unwind` (renamed from `propagate`) * `std::panic::AssertUnwindSafe` (renamed from `AssertRecoverSafe`) * `std::panic::UnwindSafe` (renamed from `RecoverSafe`) * `str::is_char_boundary` * `<*const T>::as_ref` * `<*mut T>::as_ref` * `<*mut T>::as_mut` * `AsciiExt::make_ascii_uppercase` * `AsciiExt::make_ascii_lowercase` * `char::decode_utf16` * `char::DecodeUtf16` * `char::DecodeUtf16Error` * `char::DecodeUtf16Error::unpaired_surrogate` * `BTreeSet::take` * `BTreeSet::replace` * `BTreeSet::get` * `HashSet::take` * `HashSet::replace` * `HashSet::get` * `OsString::with_capacity` * `OsString::clear` * `OsString::capacity` * `OsString::reserve` * `OsString::reserve_exact` * `OsStr::is_empty` * `OsStr::len` * `std::os::unix::thread` * `RawPthread` * `JoinHandleExt` * `JoinHandleExt::as_pthread_t` * `JoinHandleExt::into_pthread_t` * `HashSet::hasher` * `HashMap::hasher` * `CommandExt::exec` * `File::try_clone` * `SocketAddr::set_ip` * `SocketAddr::set_port` * `SocketAddrV4::set_ip` * `SocketAddrV4::set_port` * `SocketAddrV6::set_ip` * `SocketAddrV6::set_port` * `SocketAddrV6::set_flowinfo` * `SocketAddrV6::set_scope_id` * `<[T]>::copy_from_slice` * `ptr::read_volatile` * `ptr::write_volatile` * The `#[deprecated]` attribute * `OpenOptions::create_new` Deprecated * `std::raw::Slice` - use raw parts of `slice` module instead * `std::raw::Repr` - use raw parts of `slice` module instead * `str::char_range_at` - use slicing plus `chars()` plus `len_utf8` * `str::char_range_at_reverse` - use slicing plus `chars().rev()` plus `len_utf8` * `str::char_at` - use slicing plus `chars()` * `str::char_at_reverse` - use slicing plus `chars().rev()` * `str::slice_shift_char` - use `chars()` plus `Chars::as_str` * `CommandExt::session_leader` - use `before_exec` instead. Closes #27719 cc #27751 (deprecating the `Slice` bits) Closes #27754 Closes #27780 Closes #27809 Closes #27811 Closes #27830 Closes #28050 Closes #29453 Closes #29791 Closes #29935 Closes #30014 Closes #30752 Closes #31262 cc #31398 (still need to deal with `before_exec`) Closes #31405 Closes #31572 Closes #31755 Closes #31756
2016-03-26Rollup merge of #32387 - alexcrichton:ascii-test, r=aturonManish Goregaokar-0/+6
std: Add regression test for #32074 Just to make sure we don't accidentally break this in the future.
2016-03-20std: Add regression test for #32074Alex Crichton-0/+6
Just to make sure we don't accidentally break this in the future.
2016-03-17std: Revert addition of `into_ascii_*` methodsAlex Crichton-102/+0
The addition of these methods in #31335 required adding impls of the trait for the `String` and `Vec<T>` types. This unfortunately caused a regression (#32074) in type inference for using these methods which the libs team has decided to not push forward with. These methods were stabilized in #32020 which was intended to get backported to beta, but the backport hasn't happened just yet. This commit reverts both the addition and stabilization of these methods. One proposed method of handling this, in #32076, was to move the methods to an extra trait to avoid conflicts with type inference. After some discussion, however, the libs team concluded that we probably want to reevaluate what we're doing here, so discussion will continue on the tracking issue, #27809.
2016-03-07Auto merge of #32051 - steveklabnik:gh9447, r=blussbors-1/+1
Fixes #9447
2016-03-04End stdlib module summaries with a full stop.Steve Klabnik-1/+1
Fixes #9447
2016-03-03std: Stabilize `into_*` ASCII methodsAlex Crichton-8/+4
These were intended to land in stable 1.8 but were just waiting for the implementation PR, so now they're landing. Specifically this PR stabilizes: * `AsciiExt::into_ascii_uppercase` * `AsciiExt::into_ascii_lowercase` * `AsciiExt for Vec<u8>` * `AsciiExt for String`
2016-03-01Auto merge of #31335 - SimonSapin:ascii-into, r=alexcrichtonbors-0/+106
The default implementations (with `where Self: Sized`) are so that methods that take `self` by value can exist in a trait that’s implemented for dynamically-sized types (`str` and `[u8]`). CC https://github.com/rust-lang/rust/issues/27809#issuecomment-177564950 CC @alexcrichton
2016-02-14Rollup merge of #31584 - tshepang:shorten, r=steveklabnikManish Goregaokar-5/+5
2016-02-11doc: assert_eq on 2 boolean values is redundantTshepang Lekhonkhobe-5/+5
2016-02-11doc: add missing wordsTshepang Lekhonkhobe-1/+1
2016-02-04Clarify scenario where AsciiExt appears to operate on non-ASCIICorey Farwell-0/+21
Fixes https://github.com/rust-lang/rust/issues/31203
2016-02-01Add AsciiExt::into_ascii_{upper,lower}caseSimon Sapin-0/+106
The default implementations (with where Self: Sized) are so that methods that take `self` by value can exist in a trait that’s implemented for dynamically-sized types (`str` and `[u8]`). CC https://github.com/rust-lang/rust/issues/27809#issuecomment-177564950
2015-08-15std: Add issues to all unstable featuresAlex Crichton-2/+2
2015-08-12Remove all unstable deprecated functionalityAlex Crichton-85/+14
This commit removes all unstable and deprecated functions in the standard library. A release was recently cut (1.3) which makes this a good time for some spring cleaning of the deprecated functions.
2015-08-09Make `str::as_bytes_mut` privateTobias Bucher-2/+3
2015-08-09Replace many uses of `mem::transmute` with more specific functionsTobias Bucher-3/+2
The replacements are functions that usually use a single `mem::transmute` in their body and restrict input and output via more concrete types than `T` and `U`. Worth noting are the `transmute` functions for slices and the `from_utf8*` family for mutable slices. Additionally, `mem::transmute` was often used for casting raw pointers, when you can already cast raw pointers just fine with `as`.
2015-07-29Rollup merge of #27326 - steveklabnik:doc_show_use, r=GankroSteve Klabnik-2/+4
In spirit with https://internals.rust-lang.org/t/should-we-keep-including-obvious-imports-in-code-examples/2217, show the feature flags we're using in examples. (also one instance of 'use')
2015-07-27std: Deprecate a number of unstable featuresAlex Crichton-0/+9
Many of these have long since reached their stage of being obsolete, so this commit starts the removal process for all of them. The unstable features that were deprecated are: * cmp_partial * fs_time * hash_default * int_slice * iter_min_max * iter_reset_fuse * iter_to_vec * map_in_place * move_from * owned_ascii_ext * page_size * read_and_zero * scan_state * slice_chars * slice_position_elem * subslice_offset
2015-07-27Show appropriate feature flags in docsSteve Klabnik-2/+4
2015-07-13Implement IndexMut for String and str.Simon Sapin-0/+4
... matching the existing Index impls. There is no reason not to if String implement DerefMut. The code removed in `src/librustc/middle/effect.rs` was added in #9750 to prevent things like `s[0] = 0x80` where `s: String`, but I belive became unnecessary when the Index(Mut) traits were introduced.
2015-07-13Add more tests for AsciiExt::is_asciiSimon Sapin-8/+11
2015-07-13Add tests for AsciiExt::make_ascii_*case, including on String.Simon Sapin-0/+45
2015-06-17std: Split the `std_misc` featureAlex Crichton-5/+1
2015-06-10Removed many pointless calls to *iter() and iter_mut()Joshua Landau-1/+1
2015-04-21Model lexer: Fix remaining issuesPiotr Czarnecki-2/+0
2015-04-13pluralize doc comment verbs and add missing periodsAndrew Paseltiner-6/+6
2015-03-27Test fixes and rebase conflicts, round 3Alex Crichton-0/+2
2015-03-24Add examples for std::asciiSteve Klabnik-4/+96
Also tweaked a few things.
2015-03-13Deprecate range, range_step, count, distributionsAaron Turon-2/+2
This commit deprecates the `count`, `range` and `range_step` functions in `iter`, in favor of range notation. To recover all existing functionality, a new `step_by` adapter is provided directly on `ops::Range` and `ops::RangeFrom`. [breaking-change]
2015-03-05Remove integer suffixes where the types in compiled code are identical.Eduard Burtescu-6/+6
2015-02-23Add documentation to associated types in libcore, libstdIvan Petkov-0/+1
2015-02-17std: Stabilize the `ascii` moduleAlex Crichton-70/+122
This commit performs a stabilization pass over the `std::ascii` module taking the following actions: * the module name is now stable * `AsciiExt` is now stable after moving its type parameter to an `Owned` associated type * `AsciiExt::is_ascii` is now stable * `AsciiExt::to_ascii_uppercase` is now stable * `AsciiExt::to_ascii_lowercase` is now stable * `AsciiExt::eq_ignore_ascii_case` is now stable * `AsciiExt::make_ascii_uppercase` is added to possibly replace `OwnedAsciiExt::into_ascii_uppercase` (similarly for lowercase variants). * `escape_default` now returns an iterator and is stable * `EscapeDefault` is now stable Trait implementations are now also marked stable. Primarily it is still unstable to *implement* the `AsciiExt` trait due to it containing some unstable methods. [breaking-change]
2015-02-15Audit integer types in libunicode, libcore/(char, str) and libstd/asciiVadim Petrochenkov-2/+2
2015-02-05Use `for` instead of `while` in ascii.rs testsKevin Yap-19/+7
2015-02-05cleanup: replace `as[_mut]_slice()` calls with deref coercionsJorge Aparicio-1/+1
2015-02-02`for x in xs.iter_mut()` -> `for x in &mut xs`Jorge Aparicio-2/+2
Also `for x in option.iter_mut()` -> `if let Some(ref mut x) = option`