diff options
Diffstat (limited to 'src/doc/complement-cheatsheet.md')
| -rw-r--r-- | src/doc/complement-cheatsheet.md | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/doc/complement-cheatsheet.md b/src/doc/complement-cheatsheet.md index 759518b6769..f14b70afc7a 100644 --- a/src/doc/complement-cheatsheet.md +++ b/src/doc/complement-cheatsheet.md @@ -23,14 +23,14 @@ let y: int = x.unwrap(); **Int to string, in non-base-10** -Use the `format_strbuf!` syntax extension. +Use the `format!` syntax extension. ~~~ let x: int = 42; -let y: String = format_strbuf!("{:t}", x); // binary -let y: String = format_strbuf!("{:o}", x); // octal -let y: String = format_strbuf!("{:x}", x); // lowercase hexadecimal -let y: String = format_strbuf!("{:X}", x); // uppercase hexadecimal +let y: String = format!("{:t}", x); // binary +let y: String = format!("{:o}", x); // octal +let y: String = format!("{:x}", x); // lowercase hexadecimal +let y: String = format!("{:X}", x); // uppercase hexadecimal ~~~ **String to int, in non-base-10** |
