diff options
| author | Teddy Wing | 2016-08-06 01:25:40 -0400 | 
|---|---|---|
| committer | Teddy Wing | 2016-08-06 01:27:29 -0400 | 
| commit | bfbc5dc4455e01ed5e6f5fb8dd2dca47497d73a9 (patch) | |
| tree | c96f0a38c68d67cbc12f71dfe6feb395bf3b24ad /src | |
| parent | 7f887ca1c11a421cda96ab241ebb117c3657841c (diff) | |
| download | Passextract-bfbc5dc4455e01ed5e6f5fb8dd2dca47497d73a9.tar.bz2 | |
Add a function that strips the "key" part from the line
Lines are formatted like:
    e: email@example.com
This function turns that into:
    email@example.com
It will be used to strip the "key" so that we can copy only the "value"
part of the line to the system clipboard.
Diffstat (limited to 'src')
| -rw-r--r-- | src/main.rs | 5 | 
1 files changed, 5 insertions, 0 deletions
| diff --git a/src/main.rs b/src/main.rs index fd60bee..19c2ab7 100644 --- a/src/main.rs +++ b/src/main.rs @@ -10,6 +10,11 @@ struct Point {      y: usize,  } +fn strip_key(line: &str) -> &str { +    let strings: Vec<&str> = line.split(": ").collect(); +    strings[1] +} +  fn main() {      let mut term = Terminal::new().unwrap();      term.swap_buffers().unwrap(); | 
