rust/src/libstd
bors d1df3fecdf Auto merge of #34485 - tbu-:pr_unicode_debug_str, r=alexcrichton
Escape fewer Unicode codepoints in `Debug` impl of `str`

Use the same procedure as Python to determine whether a character is
printable, described in [PEP 3138]. In particular, this means that the
following character classes are escaped:

- Cc (Other, Control)
- Cf (Other, Format)
- Cs (Other, Surrogate), even though they can't appear in Rust strings
- Co (Other, Private Use)
- Cn (Other, Not Assigned)
- Zl (Separator, Line)
- Zp (Separator, Paragraph)
- Zs (Separator, Space), except for the ASCII space `' '` `0x20`

This allows for user-friendly inspection of strings that are not
English (e.g. compare `"\u{e9}\u{e8}\u{ea}"` to `"éèê"`).

Fixes #34318.
CC #34422.

[PEP 3138]: https://www.python.org/dev/peps/pep-3138/
2016-07-28 11:20:33 -07:00
..
collections Rollup merge of #35001 - rdwilliamson:patch-1, r=alexcrichton 2016-07-26 17:21:13 -04:00
ffi
io Auto merge of #33974 - habnabit:eintr-retry-for-read-iterators, r=alexcrichton 2016-07-19 01:20:50 -07:00
net Auto merge of #34694 - mathphreak:master, r=alexcrichton 2016-07-20 07:10:09 -07:00
num std: Stabilize APIs for the 1.11.0 release 2016-07-03 10:49:01 -07:00
os
prelude
rand
sync Auto merge of #34724 - mitchmindtree:mpsc_receiver_try_recv, r=alexcrichton 2016-07-21 22:39:48 -07:00
sys Auto merge of #34485 - tbu-:pr_unicode_debug_str, r=alexcrichton 2016-07-28 11:20:33 -07:00
thread
time
ascii.rs
build.rs
Cargo.toml
env.rs Auto merge of #33312 - Byron:double-ended-iterator-for-args, r=alexcrichton 2016-07-27 02:26:37 -07:00
error.rs Add examples for std::Error module 2016-07-10 22:29:19 +02:00
fs.rs Rollup merge of #35010 - GuillaumeGomez:file_doc, r=steveklabnik 2016-07-26 17:21:13 -04:00
lib.rs Rename char::escape to char::escape_debug and add tracking issue 2016-07-28 02:20:49 +02:00
macros.rs doc: Mention that writeln! and println! always use LF 2016-07-12 14:39:16 +09:00
memchr.rs Fix a few typos in the code 2016-07-03 10:02:24 +02:00
panic.rs Set unwind_safe_lock_refs stability to 1.12.0. 2016-07-11 07:34:20 -07:00
panicking.rs Revert "Refactored code to access TLS only in case of panic" 2016-07-16 22:19:43 +02:00
path.rs Fix std::path::Path::file_name() doc 2016-07-06 01:26:24 +02:00
primitive_docs.rs Improve primitive integers documentation 2016-07-08 23:03:17 +02:00
process.rs Add doc example for std::process::ExitStatus::success. 2016-07-12 21:32:55 -04:00
rt.rs
rtdeps.rs