diff options
-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] |