C++ streams in rust
| examples | new example | |
| src | cargo fmt | |
| .gitignore | init | |
| Cargo.lock | v1.1.0 | |
| Cargo.toml | v1.1.0 | |
| LICENSE | update LICENSE | |
| README.md | fix typo | |
C++ streams in Rust
Are you tired of annoying println! calls? Do you miss your glorious std::cout in Rust?
Examples
usecppstreams::*;fn main(){Cout<<"Hello, world!"<<Endl;}usecppstreams::*;fn main(){letmuta: i32 =Default::default();letmutb: i32 =Default::default();Cin>>&muta;Cin>>&mutb;Cout<<a<<" + "<<b<<" = "<<(a+b)<<Endl;}usecppstreams::*;fn main(){letmutstr_stream=StringStream::default();&mutstr_stream<<"Hello";&mutstr_stream<<','<<' ';&mutstr_stream<<"world!";Cout<<str_stream<<Endl;}usecppstreams::*;fn main(){letdata=vec![1,2,3,4];// use Debug trait
Cout<<debug!(data)<<Endl;// complex formatting
Cout<<formatted!("{data:#?}")<<Endl;}