[][src]Function rustwtxt::parse::mention_to_nickname

pub fn mention_to_nickname(line: &str) -> Option<String>

Takes a mention in the form of @<nick https://example.com/twtxt.txt> and reduces it to just the nickname.

Examples

let status = "2019.09.09\tHey there, @<nickname https://example.com/twtxt.txt!>";
let mention = parse::mention_to_nickname(status).unwrap();
assert_eq!(mention, "nickname");