Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,17 @@
|
|||
#[macro_use]
|
||||
extern crate clap;
|
||||
use clap::App;
|
||||
fn main() {
|
||||
let yaml = load_yaml!("cli.yaml");
|
||||
let matches = App::from(yaml).get_matches();
|
||||
|
||||
let str1 = matches.value_of("STRING1").unwrap();
|
||||
let str2 = matches.value_of("STRING2").unwrap();
|
||||
let str3 = matches.value_of("SEPARATOR").unwrap();
|
||||
|
||||
println!("{:?}", f(&str1, &str2, &str3));
|
||||
}
|
||||
|
||||
fn f<'a>(s1: &'a str, s2: &'a str, sep :&'a str) -> String{
|
||||
[s1,sep,sep,s2].iter().map(|x| *x).collect()
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue