Skip to main content

script_class

Function script_class 

Source
pub fn script_class(lang: Option<&str>) -> Option<ScriptClass>
Expand description

Resolve the effective script class from positive script evidence only.

Returns None when the language tag carries no usable evidence for either supported class. Latin and Cyrillic both select the narrow/Latin class; unrecognized scripts have no positive evidence. Callers realizing wrap punctuation should fall back to the style-declared default via wrap_script_class rather than treating None as a script itself.