mla-titlecase 0.3.0

MLA title casing library
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use super::{abbreviations, particles, protected, small_words};
use crate::config::LocaleProfile;

pub(crate) fn is_small_word(word: &str) -> bool {
    small_words::contains(word)
}

pub(crate) fn abbreviation_spelling(word: &str) -> Option<&'static str> {
    abbreviations::canonical(word)
}

pub(crate) fn built_in_protected_spelling(word: &str) -> Option<&'static str> {
    protected::canonical(word)
}

pub(crate) fn is_name_particle_for_locale(word: &str, locale: LocaleProfile) -> bool {
    particles::contains_for_locale(word, locale)
}