This repository has been archived on 2024-10-16. You can view files and clone it, but cannot push or open issues or pull requests.
2024-05-10 15:55:24 +02:00
|
|
|
//! # numf
|
|
|
|
//!
|
|
|
|
//! This binary should just take any amount of numbers and print them out formatted to some other
|
|
|
|
//! system.
|
|
|
|
|
2024-05-12 19:53:38 +02:00
|
|
|
use clap::Parser;
|
2024-05-10 15:55:24 +02:00
|
|
|
|
2024-05-12 01:02:55 +02:00
|
|
|
mod format;
|
|
|
|
use format::*;
|
2024-05-10 15:55:24 +02:00
|
|
|
|
2024-05-10 13:57:36 +02:00
|
|
|
fn main() {
|
2024-05-12 19:53:38 +02:00
|
|
|
let options = FormatOptions::parse();
|
2024-05-10 15:55:24 +02:00
|
|
|
|
|
|
|
let mut out: Vec<String> = Vec::new();
|
|
|
|
|
2024-05-12 19:53:38 +02:00
|
|
|
for num in options.numbers() {
|
|
|
|
out.push(options.format().format(*num, &options));
|
2024-05-10 15:55:24 +02:00
|
|
|
}
|
|
|
|
for o in out {
|
|
|
|
println!("{o}")
|
|
|
|
}
|
|
|
|
}
|