You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
505 B
Rust
26 lines
505 B
Rust
#[cfg(test)]
|
|
mod tests {
|
|
use crate::*;
|
|
|
|
#[test]
|
|
fn tests() {
|
|
dbg!(parse_args("Hello world".to_string(), 0x00));
|
|
}
|
|
}
|
|
|
|
/// Parses the command line arguments into a list of parameters.
|
|
pub fn parse_args(args: String, mode: u8) -> Vec<String> {
|
|
match mode {
|
|
/// Returns exact input string.
|
|
0x00 => {vec![args]},
|
|
/// Seperates all strings
|
|
0x07 => {
|
|
|
|
},
|
|
///
|
|
0x10 => {
|
|
|
|
},
|
|
_ => panic!("Unexpected input")
|
|
}
|
|
} |