diff options
author | Teddy Wing | 2016-08-06 05:58:07 -0400 |
---|---|---|
committer | Teddy Wing | 2016-08-06 05:58:07 -0400 |
commit | 97feec40b57031156196af7c61ccbc2aba6ec8d7 (patch) | |
tree | 97e8b6d84a59a83bb10d6318effd848d404b5ba4 | |
parent | 833339151a14866ccf499dd57f1849766c7c3555 (diff) | |
download | Passextract-97feec40b57031156196af7c61ccbc2aba6ec8d7.tar.bz2 |
Add documentation for `strip_key`v0.0.1
-rw-r--r-- | src/main.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/main.rs b/src/main.rs index 04f2738..4a18223 100644 --- a/src/main.rs +++ b/src/main.rs @@ -15,6 +15,14 @@ struct Point { y: usize, } +/// Strips the part of a line before and including the first colon. +/// +/// # Examples +/// +/// ``` +/// let value = strip_key("e: email@example.com"); +/// assert_eq!(value, "email@example.com"); +/// ``` fn strip_key(line: &str) -> &str { let strings: Vec<&str> = line.split(": ").collect(); strings[1] |