<commit_before>pub fn camel_case(name: &str) -> String {
    let mut s = String::new();
    let mut last = ' ';
    for c in name.chars().skip_while(|c| !c.is_ascii_alphanumeric()) {
        if !c.is_ascii_alphanumeric() {
            last = c;
            continue;
        }
        if (!last.is_ascii_alphanumeric() && c.is_ascii_alphanumeric())
            || (last.is_ascii_lowercase() && c.is_ascii_uppercase())
        {
            s.push(c.to_ascii_uppercase());
        } else if last.is_ascii_alphabetic() {
            s.push(c.to_ascii_lowercase());
        } else {
            s.push(c);
        }
        last = c;
    }
    s
}

pub fn snake_case(name: &str) -> String {
    sep_case(name, '_')
}

pub fn kebab_case(name: &str) -> String {
    sep_case(name, '-')
}

fn sep_case(name: &str, separator: char) -> String {
    let mut s = String::new();
    let mut last = 'A';
    for c in name.chars().skip_while(|c| !c.is_ascii_alphanumeric()) {
        if !c.is_ascii_alphanumeric() {
            last = c;
            continue;
        }
        if (!last.is_ascii_alphanumeric() && c.is_ascii_alphanumeric())
            || (last.is_ascii_lowercase() && c.is_ascii_uppercase())
        {
            s.push(separator);
        }
        s.push(c.to_ascii_lowercase());
        last = c;
    }
    s
}

pub fn type_case(name: &str) -> String {
    let s = camel_case(name);
    uppercase_first_letter(&s)<commit_msg>shared: Fixcase functions after ascii changes<commit_after>pub fn camel_case(name: &str) -> String {
    let mut s = String::new();
    let mut last = ' ';
    for c in name.chars().skip_while(|c| !c.is_ascii_alphanumeric()) {
        if !c.is_ascii_alphanumeric() {
            last = c;
            continue;
        }
        if (last.is_ascii() && !last.is_ascii_alphanumeric() && c.is_ascii_alphanumeric())
            || (last.is_ascii_lowercase() && c.is_ascii_uppercase())
        {
            s.push(c.to_ascii_uppercase());
        } else if last.is_ascii_alphabetic() {
            s.push(c.to_ascii_lowercase());
        } else {
            s.push(c);
        }
        last = c;
    }
    s
}

pub fn snake_case(name: &str) -> String {
    sep_case(name, '_')
}

pub fn kebab_case(name: &str) -> String {
    sep_case(name, '-')
}

fn sep_case(name: &str, separator: char) -> String {
    let mut s = String::new();
    let mut last = 'A';
    for c in name.chars().skip_while(|c| !c.is_ascii_alphanumeric()) {
        if !c.is_ascii_alphanumeric() {
            last = c;
            continue;
        }
        if (last.is_ascii() && !last.is_ascii_alphanumeric() && c.is_ascii_alphanumeric())
            || (last.is_ascii_lowercase() && c.is_ascii_uppercase())
        {
            s.push(separator);
        }
        s.push(c.to_ascii_lowercase());
        last = c;
    }
    s
}

pub fn type_case(name: &str) -> String {
    let s = camel_case(name);
    uppercase_first_letter(&s)
{'fraction_non_alphanumeric': 0.1520408163265306, 'fraction_numerical': 0.0, 'mean_word_length': 2.0828092243186584, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4602718', 'n_tokens_mistral': 1074, 'n_tokens_neox': 1043, 'n_words': 190}