about summary refs log tree commit diff
path: root/src/libcore/char.rs
AgeCommit message (Collapse)AuthorLines
2015-03-10std: Stabilize more of the `char` moduleAlex Crichton-221/+4
This commit performs another pass over the `std::char` module for stabilization. Some minor cleanup is performed such as migrating documentation from libcore to libunicode (where the `std`-facing trait resides) as well as a slight reorganiation in libunicode itself. Otherwise, the stability modifications made are: * `char::from_digit` is now stable * `CharExt::is_digit` is now stable * `CharExt::to_digit` is now stable * `CharExt::to_{lower,upper}case` are now stable after being modified to return an iterator over characters. While the implementation today has not changed this should allow us to implement the full set of case conversions in unicode where some characters can map to multiple when doing an upper or lower case mapping. * `StrExt::to_{lower,upper}case` was added as unstable for a convenience of not having to worry about characters expanding to more characters when you just want the whole string to get into upper or lower case. This is a breaking change due to the change in the signatures of the `CharExt::to_{upper,lower}case` methods. Code can be updated to use functions like `flat_map` or `collect` to handle the difference. [breaking-change]
2015-03-05Remove integer suffixes where the types in compiled code are identical.Eduard Burtescu-21/+21
2015-02-20Refactored code into Searcher traits with naive implementationsMarvin Löbel-12/+15
Made the family of Split iterators use the Pattern API Renamed the Matcher traits into Searcher
2015-02-18Remove `i`, `is`, `u`, or `us` suffixes that are not necessary.Niko Matsakis-6/+6
2015-02-15Audit integer types in libunicode, libcore/(char, str) and libstd/asciiVadim Petrochenkov-21/+21
2015-02-02Test fixes and rebase conflictsAlex Crichton-4/+4
2015-02-02Documenting libcore/char.rsSteve Klabnik-20/+174
2015-01-25Merge remote-tracking branch 'rust-lang/master'Brian Anderson-46/+66
Conflicts: src/libcore/cmp.rs src/libcore/fmt/mod.rs src/libcore/iter.rs src/libcore/marker.rs src/libcore/num/f32.rs src/libcore/num/f64.rs src/libcore/result.rs src/libcore/str/mod.rs src/librustc/lint/builtin.rs src/librustc/lint/context.rs src/libstd/sync/mpsc/mod.rs src/libstd/sync/poison.rs
2015-01-25Moving away from deprecated i/u suffixes in libcoreAlfie John-8/+8
2015-01-24Add ffi::OsString and OsStrAaron Turon-38/+58
Per [RFC 517](https://github.com/rust-lang/rfcs/pull/575/), this commit introduces platform-native strings. The API is essentially as described in the RFC. The WTF-8 implementation is adapted from @SimonSapin's [implementation](https://github.com/SimonSapin/rust-wtf8). To make this work, some encodign and decoding functionality in `libcore` is now exported in a "raw" fashion reusable for WTF-8. These exports are *not* reexported in `std`, nor are they stable.
2015-01-23grandfathered -> rust1Brian Anderson-18/+18
2015-01-23Set unstable feature names appropriatelyBrian Anderson-9/+9
* `core` - for the core crate * `hash` - hashing * `io` - io * `path` - path * `alloc` - alloc crate * `rand` - rand crate * `collections` - collections crate * `std_misc` - other parts of std * `test` - test crate * `rustc_private` - everything else
2015-01-21Remove 'since' from unstable attributesBrian Anderson-9/+9
2015-01-21Add 'feature' and 'since' to stability attributesBrian Anderson-27/+33
2015-01-05Stabilization of impls and fallout from stabilizationAaron Turon-0/+2
2015-01-05char: small tweak since `is_some` > equivalent `match`.Huon Wilson-4/+1
2015-01-05Rename `core::char::Char` to `CharExt` to match prelude guidelines.Huon Wilson-1/+1
Imports may need to be updated so this is a [breaking-change]
2015-01-05Mark the contents of `char` stable.Huon Wilson-21/+25
2015-01-05Switch encode_utf* to by-value self.Huon Wilson-6/+6
2015-01-03Remove deprecated functionalityAlex Crichton-121/+0
This removes a large array of deprecated functionality, regardless of how recently it was deprecated. The purpose of this commit is to clean out the standard libraries and compiler for the upcoming alpha release. Some notable compiler changes were to enable warnings for all now-deprecated command line arguments (previously the deprecated versions were silently accepted) as well as removing deriving(Zero) entirely (the trait was removed). The distribution no longer contains the libtime or libregex_macros crates. Both of these have been deprecated for some time and are available externally.
2015-01-03sed -i -s 's/#\[deriving(/#\[derive(/g' **/*.rsJorge Aparicio-4/+4
2015-01-03core: use assoc types in Iterator et alJorge Aparicio-2/+6
2014-12-30Implement `Clone` for a large number of iterators & other adaptors.Huon Wilson-1/+4
It's useful to be able to save state.
2014-12-17rollup merge of #19885: alexcrichton/char-escapeAlex Crichton-75/+68
This changes the `escape_unicode` method on a `char` to use the new style of unicode escapes in the language. Closes #19811 Closes #19879
2014-12-17rollup merge of #19830: mchaput/patch-1Alex Crichton-1/+1
Error message has wrong spelling ("radix is to high").
2014-12-16std: Change escape_unicode to use new escapesAlex Crichton-75/+68
This changes the `escape_unicode` method on a `char` to use the new style of unicode escapes in the language. Closes #19811 Closes #19879
2014-12-14std: Collapse SlicePrelude traitsAlex Crichton-1/+1
This commit collapses the various prelude traits for slices into just one trait: * SlicePrelude/SliceAllocPrelude => SliceExt * CloneSlicePrelude/CloneSliceAllocPrelude => CloneSliceExt * OrdSlicePrelude/OrdSliceAllocPrelude => OrdSliceExt * PartialEqSlicePrelude => PartialEqSliceExt
2014-12-14Fix mispelling in char.rs error messagemchaput-1/+1
Error message has wrong spelling ("radix is to high").
2014-12-13libcore: use unboxed closures in the `char` moduleJorge Aparicio-2/+3
2014-12-11Register new snapshotsAlex Crichton-6/+6
2014-12-08librustc: Make `Copy` opt-in.Niko Matsakis-0/+1
This change makes the compiler no longer infer whether types (structures and enumerations) implement the `Copy` trait (and thus are implicitly copyable). Rather, you must implement `Copy` yourself via `impl Copy for MyType {}`. A new warning has been added, `missing_copy_implementations`, to warn you if a non-generic public type has been added that could have implemented `Copy` but didn't. For convenience, you may *temporarily* opt out of this behavior by using `#![feature(opt_out_copy)]`. Note though that this feature gate will never be accepted and will be removed by the time that 1.0 is released, so you should transition your code away from using it. This breaks code like: #[deriving(Show)] struct Point2D { x: int, y: int, } fn main() { let mypoint = Point2D { x: 1, y: 1, }; let otherpoint = mypoint; println!("{}{}", mypoint, otherpoint); } Change this code to: #[deriving(Show)] struct Point2D { x: int, y: int, } impl Copy for Point2D {} fn main() { let mypoint = Point2D { x: 1, y: 1, }; let otherpoint = mypoint; println!("{}{}", mypoint, otherpoint); } This is the backwards-incompatible part of #13231. Part of RFC #3. [breaking-change]
2014-12-05Utilize fewer reexportsCorey Farwell-1/+2
In regards to: https://github.com/rust-lang/rust/issues/19253#issuecomment-64836729 This commit: * Changes the #deriving code so that it generates code that utilizes fewer reexports (in particur Option::* and Result::*), which is necessary to remove those reexports in the future * Changes other areas of the codebase so that fewer reexports are utilized
2014-11-26Update docstrings for UnicodeChar::is_digit => is_numeric renameSimon Sapin-3/+3
2014-11-21core: Convert a 'failure' to 'panic' in docsBrian Anderson-2/+2
2014-11-21core: Update docs for escape_unicode, escape_defaultBrian Anderson-3/+4
2014-11-21core: Convert Char::escape_default, escape_unicode to iteratorsBrian Anderson-34/+95
[breaking-change]
2014-11-21core: Convert Char methods to by-val selfBrian Anderson-27/+27
Methods on primitmive Copy types generally should take `self`. [breaking-change]
2014-11-21Fix various deprecation warnings from char changesBrian Anderson-56/+66
2014-11-21core: Mark remaining Char methods unstableBrian Anderson-0/+16
The `Char` trait itself may go away in favor of primitive inherent methods. Still some questions about whether the preconditions are following the final error handling conventions.
2014-11-21core: Deprecated remaining free functions in `char`Brian Anderson-0/+5
Prefer the methods.
2014-11-21core: Add stability attributes to char::from_digit and from_u32Brian Anderson-0/+6
For now we are preferring free functions for primitive ctors, so they are marked 'unstable' pending final decision. The methods on `Char` are 'deprecated'.
2014-11-21core: Add Char::len_utf16Brian Anderson-0/+10
Missing method to pair with len_utf8.
2014-11-21core: Rename Char::len_utf8_bytes to Char::len_utf8Brian Anderson-0/+9
"bytes" is redundant. Deprecate the old.
2014-11-21core: Rename Char::is_digit_radix to is_digitBrian Anderson-0/+19
This fits the naming of `to_digit` and `from_digit`. Leave the old name deprecated.
2014-11-21char: Mark the MAX constant stableBrian Anderson-0/+1
2014-11-21core: Mark Char trait experimentalBrian Anderson-0/+2
2014-11-21core: Add from_u32 to the Char traitBrian Anderson-0/+6
This is the only free function not part of the trait.
2014-11-12Fix remaining documentation to reflect fail!() -> panic!()Barosl Lee-12/+12
Throughout the docs, "failure" was replaced with "panics" if it means a task panic. Otherwise, it remained as is, or changed to "errors" to clearly differentiate it from a task panic.
2014-11-06Prelude: rename and consolidate extension traitsAaron Turon-1/+1
This commit renames a number of extension traits for slices and string slices, now that they have been refactored for DST. In many cases, multiple extension traits could now be consolidated. Further consolidation will be possible with generalized where clauses. The renamings are consistent with the [new `-Prelude` suffix](https://github.com/rust-lang/rfcs/pull/344). There are probably a few more candidates for being renamed this way, but that is left for API stabilization of the relevant modules. Because this renames traits, it is a: [breaking-change] However, I do not expect any code that currently uses the standard library to actually break. Closes #17917
2014-11-04libsyntax: Forbid escapes in the inclusive range `\x80`-`\xff` inPatrick Walton-1/+1
Unicode characters and strings. Use `\u0080`-`\u00ff` instead. ASCII/byte literals are unaffected. This PR introduces a new function, `escape_default`, into the ASCII module. This was necessary for the pretty printer to continue to function. RFC #326. Closes #18062. [breaking-change]