fn handle_special_char()

in src/metrics/arabic.rs [132:167]


fn handle_special_char(front: Option<char>, behind: Option<char>) -> u32 {
    let front = front.map(|x| x as u32).unwrap_or(0);
    let behind = behind.map(|x| x as u32).unwrap_or(0);

    match behind {
        0x622 => {
            if is_in_front_set(&front) {
                ARABIC_SPECIAL[0][1]
            } else {
                ARABIC_SPECIAL[0][0]
            }
        }
        0x623 => {
            if is_in_front_set(&front) {
                ARABIC_SPECIAL[1][1]
            } else {
                ARABIC_SPECIAL[1][0]
            }
        }
        0x625 => {
            if is_in_front_set(&front) {
                ARABIC_SPECIAL[2][1]
            } else {
                ARABIC_SPECIAL[2][0]
            }
        }
        0x627 => {
            if is_in_front_set(&front) {
                ARABIC_SPECIAL[3][1]
            } else {
                ARABIC_SPECIAL[3][0]
            }
        }
        _ => 0x644,
    }
}