From 5977376b4615f5efe590ee7775c48d82211c68ab Mon Sep 17 00:00:00 2001 From: novalis Date: Tue, 3 Sep 2013 00:38:46 -0400 Subject: Test and document escaping on format!() --- src/libstd/fmt/mod.rs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/libstd/fmt') diff --git a/src/libstd/fmt/mod.rs b/src/libstd/fmt/mod.rs index da5abe95787..8d50f5efa48 100644 --- a/src/libstd/fmt/mod.rs +++ b/src/libstd/fmt/mod.rs @@ -308,6 +308,13 @@ For integral types, this has no meaning currently. For floating-point types, this indicates how many digits after the decimal point should be printed. +## Escaping + +The literal characters `{`, `}`, or `#` may be included in a string by +preceding them with the `\` character. Since `\` is already an +escape character in Rust strings, a string literal using this escape +will look like `"\\{"`. + */ use prelude::*; -- cgit 1.4.1-3-g733a5