str/internal_translit

Internal transliteration tables and helpers. Not part of the public API - may change without notice.

Values

pub fn remove_combining_marks(s: String) -> String

Removes Unicode combining marks (diacritics) from a string.

pub fn replacements() -> List(#(String, String))

Returns the character replacement table as a list of (from, to) tuples. Each tuple maps a Unicode character to its ASCII equivalent.

Using tuples instead of lists provides:

  • Type safety: exactly 2 elements guaranteed
  • Better pattern matching: no need for fallback case
  • Clearer intent: represents a mapping relationship
Search Document