Notes: Add helper to get name from header

This commit is contained in:
Matthias Beyer 2015-12-30 11:32:58 +01:00
parent 5cc4b4d079
commit 591717780a

View file

@ -48,3 +48,12 @@ pub fn get_tags_from_header(header: &FHD) -> Vec<String> {
headerhelpers::tags::data::get_tags_from_header(header)
}
/**
* Get the name from the Header
*
* Returns empty string if there is no NAME field
*/
pub fn get_name_from_header(header: &FHD) -> String {
headerhelpers::data::get_name_from_header(header).unwrap_or(String::from(""))
}