rust/src
Alex Crichton 9b99436152 rollup merge of #19741: alexcrichton/stabilize-str
This commit starts out by consolidating all `str` extension traits into one
`StrExt` trait to be included in the prelude. This means that
`UnicodeStrPrelude`, `StrPrelude`, and `StrAllocating` have all been merged into
one `StrExt` exported by the standard library. Some functionality is currently
duplicated with the `StrExt` present in libcore.

This commit also currently avoids any methods which require any form of pattern
to operate. These functions will be stabilized via a separate RFC.

Next, stability of methods and structures are as follows:

Stable

* from_utf8_unchecked
* CowString - after moving to std::string
* StrExt::as_bytes
* StrExt::as_ptr
* StrExt::bytes/Bytes - also made a struct instead of a typedef
* StrExt::char_indices/CharIndices - CharOffsets was renamed
* StrExt::chars/Chars
* StrExt::is_empty
* StrExt::len
* StrExt::lines/Lines
* StrExt::lines_any/LinesAny
* StrExt::slice_unchecked
* StrExt::trim
* StrExt::trim_left
* StrExt::trim_right
* StrExt::words/Words - also made a struct instead of a typedef

Unstable

* from_utf8 - the error type was changed to a `Result`, but the error type has
              yet to prove itself
* from_c_str - this function will be handled by the c_str RFC
* FromStr - this trait will have an associated error type eventually
* StrExt::escape_default - needs iterators at least, unsure if it should make
                           the cut
* StrExt::escape_unicode - needs iterators at least, unsure if it should make
                           the cut
* StrExt::slice_chars - this function has yet to prove itself
* StrExt::slice_shift_char - awaiting conventions about slicing and shifting
* StrExt::graphemes/Graphemes - this functionality may only be in libunicode
* StrExt::grapheme_indices/GraphemeIndices - this functionality may only be in
                                             libunicode
* StrExt::width - this functionality may only be in libunicode
* StrExt::utf16_units - this functionality may only be in libunicode
* StrExt::nfd_chars - this functionality may only be in libunicode
* StrExt::nfkd_chars - this functionality may only be in libunicode
* StrExt::nfc_chars - this functionality may only be in libunicode
* StrExt::nfkc_chars - this functionality may only be in libunicode
* StrExt::is_char_boundary - naming is uncertain with container conventions
* StrExt::char_range_at - naming is uncertain with container conventions
* StrExt::char_range_at_reverse - naming is uncertain with container conventions
* StrExt::char_at - naming is uncertain with container conventions
* StrExt::char_at_reverse - naming is uncertain with container conventions
* StrVector::concat - this functionality may be replaced with iterators, but
                      it's not certain at this time
* StrVector::connect - as with concat, may be deprecated in favor of iterators

Deprecated

* StrAllocating and UnicodeStrPrelude have been merged into StrExit
* eq_slice - compiler implementation detail
* from_str - use the inherent parse() method
* is_utf8 - call from_utf8 instead
* replace - call the method instead
* truncate_utf16_at_nul - this is an implementation detail of windows and does
                          not need to be exposed.
* utf8_char_width - moved to libunicode
* utf16_items - moved to libunicode
* is_utf16 - moved to libunicode
* Utf16Items - moved to libunicode
* Utf16Item - moved to libunicode
* Utf16Encoder - moved to libunicode
* AnyLines - renamed to LinesAny and made a struct
* SendStr - use CowString<'static> instead
* str::raw - all functionality is deprecated
* StrExt::into_string - call to_string() instead
* StrExt::repeat - use iterators instead
* StrExt::char_len - use .chars().count() instead
* StrExt::is_alphanumeric - use .chars().all(..)
* StrExt::is_whitespace - use .chars().all(..)

Pending deprecation -- while slicing syntax is being worked out, these methods
are all #[unstable]

* Str - while currently used for generic programming, this trait will be
        replaced with one of [], deref coercions, or a generic conversion trait.
* StrExt::slice - use slicing syntax instead
* StrExt::slice_to - use slicing syntax instead
* StrExt::slice_from - use slicing syntax instead
* StrExt::lev_distance - deprecated with no replacement

Awaiting stabilization due to patterns and/or matching

* StrExt::contains
* StrExt::contains_char
* StrExt::split
* StrExt::splitn
* StrExt::split_terminator
* StrExt::rsplitn
* StrExt::match_indices
* StrExt::split_str
* StrExt::starts_with
* StrExt::ends_with
* StrExt::trim_chars
* StrExt::trim_left_chars
* StrExt::trim_right_chars
* StrExt::find
* StrExt::rfind
* StrExt::find_str
* StrExt::subslice_offset
2014-12-22 12:45:54 -08:00
..
compiler-rt@62a4ca6055 Update compiler-rt to work for non-v7 arm. 2014-06-18 17:02:08 -07:00
compiletest Fallout of std::str stabilization 2014-12-21 23:31:42 -08:00
doc Fallout of std::str stabilization 2014-12-21 23:31:42 -08:00
driver Separate the driver into its own crate that uses trans, typeck. 2014-12-04 10:04:52 -05:00
etc rustc: Start "stabilizing" some flags 2014-12-19 11:38:24 -08:00
grammar Modify regex::Captures::{at,name} to return Option 2014-12-14 08:56:51 -05:00
jemalloc@b001609960 update jemalloc 2014-10-05 22:17:25 -04:00
liballoc Test fixes and rebase conflicts 2014-12-21 13:49:04 -08:00
libarena libarena: use unboxed closures 2014-12-13 17:03:46 -05:00
libbacktrace
libcollections rollup merge of #19741: alexcrichton/stabilize-str 2014-12-22 12:45:54 -08:00
libcore Fallout of std::str stabilization 2014-12-21 23:31:42 -08:00
libcoretest Fallout of std::str stabilization 2014-12-21 23:31:42 -08:00
libflate Mostly rote conversion of proc() to move|| (and occasionally Thunk::new) 2014-12-14 04:21:56 -05:00
libfmt_macros Fallout of std::str stabilization 2014-12-21 23:31:42 -08:00
libgetopts Fallout of std::str stabilization 2014-12-21 23:31:42 -08:00
libgraphviz Fallout of std::str stabilization 2014-12-21 23:31:42 -08:00
liblibc Make at_exit initialize lazily 2014-12-18 23:31:34 -08:00
liblog Fallout of std::str stabilization 2014-12-21 23:31:42 -08:00
librand librand: use #[deriving(Copy)] 2014-12-19 10:43:24 -05:00
librbml librbml: use #[deriving(Copy)] 2014-12-19 10:43:24 -05:00
libregex Fallout of std::str stabilization 2014-12-21 23:31:42 -08:00
libregex_macros rollup merge of #19820: alexcrichton/deprecate-some-more-libs 2014-12-17 11:50:24 -08:00
librustc Fallout of std::str stabilization 2014-12-21 23:31:42 -08:00
librustc_back Fallout of std::str stabilization 2014-12-21 23:31:42 -08:00
librustc_borrowck Fallout of std::str stabilization 2014-12-21 23:31:42 -08:00
librustc_driver Fallout of std::str stabilization 2014-12-21 23:31:42 -08:00
librustc_llvm librustc_llvm: use #[deriving(Copy)] 2014-12-19 10:51:00 -05:00
librustc_resolve Fallout of std::str stabilization 2014-12-21 23:31:42 -08:00
librustc_trans Fallout of std::str stabilization 2014-12-21 23:31:42 -08:00
librustc_typeck Fallout of std::str stabilization 2014-12-21 23:31:42 -08:00
librustdoc Fallout of std::str stabilization 2014-12-21 23:31:42 -08:00
libserialize Fallout of std::str stabilization 2014-12-21 23:31:42 -08:00
libstd Fallout of std::str stabilization 2014-12-21 23:31:42 -08:00
libsyntax Fallout of std::str stabilization 2014-12-21 23:31:42 -08:00
libterm Fallout of std::str stabilization 2014-12-21 23:31:42 -08:00
libtest Fallout of std::str stabilization 2014-12-21 23:31:42 -08:00
libtime rollup merge of #19972: alexcrichton/snapshots 2014-12-21 09:28:07 -08:00
libunicode Fallout of std::str stabilization 2014-12-21 23:31:42 -08:00
llvm@ec1fdb3b9d Update LLVM to get slightly better memcpy elision 2014-10-17 17:16:18 +02:00
rt Avoid .take().unwrap() with FnOnce closures 2014-12-18 23:31:52 -08:00
rust-installer@aed7347241 Use rust-installer for installation 2014-12-11 17:14:17 -08:00
rustllvm Add LLVM ExecutionEngine API 2014-12-11 15:33:27 -07:00
test rollup merge of #19741: alexcrichton/stabilize-str 2014-12-22 12:45:54 -08:00
snapshots.txt Test fixes and rebase conflicts 2014-12-21 13:49:04 -08:00