Function whatlang::detect_script [] [src]

pub fn detect_script(text: &str) -> Option<Script>

Detect only a script by a given text

Example

use whatlang::{detect_script, Script};
let script = detect_script("Благодаря Эсперанто вы обрётете друзей по всему миру!").unwrap();
assert_eq!(script, Script::Cyrillic);