readsight 1.0.2

Multilingual readability library — 86 languages, 17 formulas, TeX-based syllable counting via the Frank M. Liang algorithm.
Documentation
1
2
3
4
5
6
7
8
//! Language-code normalization.

/// Normalize a language code: trim surrounding whitespace and Unicode-lowercase.
///
/// Mirrors PHP `mb_strtolower(trim($code))`.
pub fn normalize(code: &str) -> String {
    code.trim().to_lowercase()
}