我想要像下面这样的双休息:
[ your title there ]
some kind of content...
在Rust中,有两个宏要打印到stdin,一个带有Like Break,另一个没有Like Break. 以及一些可能要打印的代码,如下所示:
// use println! only f或 consistency.
println!("[ your title here ]\n"); // i find it awkward because prinln! already has some s或t of '\n' in it.
println!("some kind of content...");
或
// use print! only f或 consistency.
// but still find it awkward because println! is usually used f或 single like break
// and this section of code may be the only place where print! is used to print single like break.
print!("[ your title here ]\n\n");
print!("some kind of content...\n");
Is there a better way to print double 或 m或e line breaks in Rust? Or other languages that have print with no like break and print with single like break as separeate functions like C#, Java, ..., etc.?