Skip to main content

char_script

Function char_script 

Source
pub fn char_script(c: char) -> Script
Expand description

Classify a character’s Unicode script via block-range lookup.

This uses hardcoded Unicode block ranges rather than an external crate, keeping the dependency footprint minimal. Coverage targets the scripts most commonly encountered in terminal/UI text. Characters outside recognized ranges return Script::Unknown.