Function to_lower_snake_case

Source
pub fn to_lower_snake_case<D: Display>(id: D) -> MiniStr
Expand description

Normalizes snake_case format

  • en.US => en_us
  • en-US => en_us
  • en-Latn-US => en_latn_us
  • zh-Hans-CN => zh_hans_cn

ยงConversion Rules

  1. Convert to ASCII lowercase
  2. Replace hyphens/dots with underscores