aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTeddy Wing2016-08-06 01:25:40 -0400
committerTeddy Wing2016-08-06 01:27:29 -0400
commitbfbc5dc4455e01ed5e6f5fb8dd2dca47497d73a9 (patch)
treec96f0a38c68d67cbc12f71dfe6feb395bf3b24ad /src
parent7f887ca1c11a421cda96ab241ebb117c3657841c (diff)
downloadPassextract-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.rs5
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();