aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs8
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]