generated from GarandPLG/rust-flake-template
- Document new Rust formatting standards in AGENTS, CODE_MAP, and PROGRESS. - Add rustfmt.toml with style 2024, 2‑space indents, 100‑char width, LF endings. - Apply consistent 2‑space indentation and ordering across source files. - Minor clean‑up of imports and whitespace to match the new style.
14 lines
277 B
Rust
14 lines
277 B
Rust
pub fn main_menu_option_helper(s: String) -> String {
|
|
if let Some(pos) = s
|
|
.char_indices()
|
|
.filter(|(_, c)| c.is_ascii_uppercase())
|
|
.nth(1)
|
|
.map(|(i, _)| i)
|
|
{
|
|
let (first, second) = s.split_at(pos);
|
|
format!("{first} {second}")
|
|
} else {
|
|
s
|
|
}
|
|
}
|