bookclerk_resolve::names

Development These docs follow the development version and change with every merge.

Last updated View as Markdown

Splitting a store's display string of contributor names.

Item Kind Summary
split_display_names function Splits a display string of contributor names into one name per entry.
NAME_SEPARATOR constant Separator between names in a flat display string, and between a name and its suffix (Martin Luther King, Jr.).

Functions

split_display_names

pub fn split_display_names(display: &str) -> Vec<String>

Splits a display string of contributor names into one name per entry.

Splits on ,, ;, & and the word and, and keeps a name suffix such as Jr. with the name before it. The caller decodes HTML entities first.

Arguments

  • display - Names as one string ("Jane Doe, John Roe & Ann Poe").

Returns

The trimmed, non-empty names in the order they appear.

Constants

NAME_SEPARATOR

pub const NAME_SEPARATOR: &str = ", ";

Separator between names in a flat display string, and between a name and its suffix (Martin Luther King, Jr.).

Generated from crates/bookclerk-resolve at main · View as Markdown