Skip to main content

thread_name

Function thread_name 

Source
pub fn thread_name(text: &str) -> &str
Expand description

The thread name of a subject: the subject without reply and forward prefixes (Re:, Fwd: and their translations, with counters such as Re[2]:), bracketed list tags and trailing (fwd) markers, as used to group messages into threads. Borrows from text.

use mail_parser::thread_name;

assert_eq!(thread_name("Re: Fwd: [list] Lunch on Friday"), "Lunch on Friday");