1
0
Fork
You've already forked cppstreams
0
C++ streams in rust
Rust 100%
2025年05月12日 15:00:00 +00:00
examples new example 2025年05月12日 14:00:00 +00:00
src cargo fmt 2025年05月12日 15:00:00 +00:00
.gitignore init 2025年05月11日 15:00:00 +00:00
Cargo.lock v1.1.0 2025年05月12日 15:00:00 +00:00
Cargo.toml v1.1.0 2025年05月12日 15:00:00 +00:00
LICENSE update LICENSE 2025年05月11日 19:00:00 +00:00
README.md fix typo 2025年05月11日 19:00:00 +00:00

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;}