fn main() { if let Some(arg) = std::env::args().nth(1) { println!("{}", { match arg.char_indices().nth(12) { Some((idx, _)) => &arg[..idx], None => &*arg } }); } }
[1] https://crates.io/crates/unicode-segmentation
[1] https://crates.io/crates/unicode-segmentation