(input: &str)
| 8 | use windows::Win32::Foundation::HANDLE; |
| 9 | |
| 10 | pub fn parse_args(input: &str) -> Vec<String> { |
| 11 | let mut args = Vec::new(); |
| 12 | let mut current = String::new(); |
| 13 | let mut in_quotes = false; |
| 14 | |
| 15 | for c in input.chars() { |
| 16 | match c { |
| 17 | '"' => { |
| 18 | in_quotes = !in_quotes; |
| 19 | } |
| 20 | ' ' if !in_quotes => { |
| 21 | if !current.is_empty() { |
| 22 | args.push(current.clone()); |
| 23 | current.clear(); |
| 24 | } |
| 25 | } |
| 26 | _ => current.push(c), |
| 27 | } |
| 28 | } |
| 29 | |
| 30 | if !current.is_empty() { |
| 31 | args.push(current); |
| 32 | } |
| 33 | |
| 34 | args |
| 35 | } |
| 36 | |
| 37 | pub fn print_help() { |
| 38 | let help_text = lc!(r#" |