mirror of
https://github.com/ouch-org/ouch.git
synced 2025-06-07 03:55:28 +00:00
16 lines
448 B
Rust
16 lines
448 B
Rust
/// Util function to skip the two leading long flag hyphens.
|
|
pub fn trim_double_hyphen(flag_text: &str) -> &str {
|
|
let mut chars = flag_text.chars();
|
|
chars.nth(1); // Skipping 2 chars
|
|
chars.as_str()
|
|
}
|
|
|
|
// Currently unused
|
|
/// Util function to skip the single leading short flag hyphen.
|
|
pub fn trim_single_hyphen(flag_text: &str) -> &str {
|
|
let mut chars = flag_text.chars();
|
|
|
|
chars.next(); // Skipping 1 char
|
|
chars.as_str()
|
|
}
|