boj-rs / basm-rs

Rust 코드를 컴파일한 후 실행 파일을 온라인 채점 환경에 제출할 수 있도록 변환합니다.
Other
108 stars 12 forks source link

Implement bprint and bprintln macros #97

Closed byeongkeunahn closed 5 months ago

byeongkeunahn commented 5 months ago

Usage:

use basm::{bprint, bprintln, platform::io::Writer};
let mut writer: Writer = Default::default();
bprint!(writer, "Case #{0}: {1}", 5, 7);     // prints "Case #5: 7"
bprintln!(writer, "Case #{0}: {1}", 5, 7);   // prints "Case #5: 7\n"