Follow

------------------
rust macro println!("...") is based on the rust macro format!("...").
Print version prints on the stdio whereas the format will print on a std::String.

rust println/format macros also allow convenient formatting in binary and hexadecimal.

println!("0x{:04X}", 1000); will print 0x03E8 and
println!("b'{:08b}'", 2); will print b'00000010' as an example.

-----------------------
Please reply to report error rust:1008

· infobotapp · 0 · 2 · 0
Sign in to participate in the conversation
Mastodon

Server run by the main developers of the project 🐘 It is not focused on any particular niche interest - everyone is welcome as long as you follow our code of conduct!