format_author_name

Function format_author_name 

pub fn format_author_name(
    surname: &Option<String>,
    given_names: &Option<String>,
    initials: &Option<String>,
) -> String
Expand description

Format an author name from components

§Arguments

  • surname - Author’s surname (last name)
  • given_names - Author’s given names (first, middle)
  • initials - Author’s initials (used if given_names is missing)

§Returns

Formatted full name following these rules:

  1. If both given_names and surname exist: “GivenNames Surname”
  2. If only surname exists: “Initials Surname” (if initials available) or “Surname”
  3. If only given_names exists: “GivenNames”
  4. If neither exists: “Unknown Author”