kalk 3.2.3

A math evaluator library that supports user-defined functions, variables and units, and can handle fairly ambiguous syntax.
Documentation
pub fn is_superscript(c: &char) -> bool {
    matches!(
        c,
        '' | '¹'
            | '²'
            | '³'
            | ''
            | ''
            | ''
            | ''
            | ''
            | ''
            | ''
            | ''
            | ''
            | ''
            | ''
            | ''
    )
}

pub fn is_subscript(c: &char) -> bool {
    matches!(
        c,
        '' | ''
            | ''
            | ''
            | ''
            | ''
            | ''
            | ''
            | ''
            | ''
            | ''
            | ''
            | ''
            | ''
            | ''
            | ''
            | ''
            | ''
            | ''
            | ''
    )
}

pub fn parse_subscript(chars: impl Iterator<Item = char>) -> Option<u8> {
    subscript_to_normal(chars).parse::<u8>().ok()
}

pub fn subscript_to_normal(chars: impl Iterator<Item = char>) -> String {
    let mut regular = String::new();
    for c in chars {
        regular.push(match c {
            '' => '0',
            '' => '1',
            '' => '2',
            '' => '3',
            '' => '4',
            '' => '5',
            '' => '6',
            '' => '7',
            '' => '8',
            '' => '9',
            '' => '+',
            '' => '-',
            '' => '=',
            '' => '(',
            '' => ')',
            '' => 'k',
            '' => 'l',
            '' => 'm',
            '' => 'n',
            '' => 'T',
            _ => c,
        });
    }

    regular.trim().to_string()
}

pub fn normal_to_subscript(chars: impl Iterator<Item = char>) -> String {
    let mut subscript = String::new();
    for c in chars {
        subscript.push(match c {
            '0' => '',
            '1' => '',
            '2' => '',
            '3' => '',
            '4' => '',
            '5' => '',
            '6' => '',
            '7' => '',
            '8' => '',
            '9' => '',
            '+' => '',
            '-' => '',
            '=' => '',
            '(' => '',
            ')' => '',
            'k' => '',
            'l' => '',
            'm' => '',
            'n' => '',
            'x' => '',
            _ => c,
        });
    }

    subscript
}