rust/src/librustc_unicode
Simon Sapin 6174b8d726 Refactor low-level UTF-16 decoding.
* Rename `utf16_items` to `decode_utf16`. "Items" is meaningless.
* Move it to `rustc_unicode::char`, exposed in `std::char`.
* Generalize it to any `u16` iterable, not just `&[u16]`.
* Make it yield `Result` instead of a custom `Utf16Item` enum that was isomorphic to `Result`. This enable using the `FromIterator for Result` impl.
* Add a `REPLACEMENT_CHARACTER` constant.
* Document how `result.unwrap_or(REPLACEMENT_CHARACTER)` replaces `Utf16Item::to_char_lossy`.
2015-08-23 00:28:56 +02:00
..
char.rs Refactor low-level UTF-16 decoding. 2015-08-23 00:28:56 +02:00
lib.rs Refactor low-level UTF-16 decoding. 2015-08-23 00:28:56 +02:00
tables.rs Remove all unstable deprecated functionality 2015-08-12 14:55:17 -07:00
u_str.rs Refactor low-level UTF-16 decoding. 2015-08-23 00:28:56 +02:00