Skip to main content

alphabetic_title

Function alphabetic_title 

Source
pub(crate) fn alphabetic_title<'a>(title: &'a str, language: &str) -> &'a str
Expand description

Returns the sort key for a title by stripping leading articles based on the book’s language, delegating to the TITLE_PREFIXES regex table.

Used by both Info::alphabetic_title and the DB sort-rank layer so that the article-stripping logic lives in exactly one place.