fn tokenize_camel_case<'a>(name: &'a str) -> Vec<&'a str> {
    let mut tokens = Vec::<&'a str>::new();
    let mut start_index: usize = 0;
    let first_char = name.chars().next().expect("name is empty");
    let mut prev_case = Case::from(first_char);
    for (index, character) in name.char_indices() {
        let case = Case::from(character);
        let diff = prev_case.diff(&case);
        if (diff == Diff::Sinking && index - start_index > 1)
            || (diff == Diff::CharType)
            || (diff == Diff::Rising)
        {
            tokens.push(&name[start_index..index]);
            start_index = index;
        }
        prev_case = case;
    }
    tokens.push(&name[start_index..]);
    tokens
}
/// Tokenize camel case to separate components. Supper lower camel and upper camel
Tokenize camel case to separate components. Supper lower camel and upper camel
Tokenize camel case to separate components . Supper lower camel and upper camel
fn tokenize_camel_case<'a>(name: &'a str) -> Vec<&'a str> {
    let mut tokens = Vec::<&'a str>::new();
    let mut start_index: usize = 0;
    let first_char = name.chars().next().expect("name is empty");
    let mut prev_case = Case::from(first_char);
    for (index, character) in name.char_indices() {
        let case = Case::from(character);
        let diff = prev_case.diff(&case);
        if (diff == Diff::Sinking && index - start_index > 1)
            || (diff == Diff::CharType)
            || (diff == Diff::Rising)
        {
            tokens.push(&name[start_index..index]);
            start_index = index;
        }
        prev_case = case;
    }
    tokens.push(&name[start_index..]);
    tokens
}
fn tokenize_camel_case < ' a > ( name : & ' a str ) -> Vec < & ' a str > { let mut tokens = Vec :: < & ' a str > :: new ( ) ; let mut start_index : usize = 0 ; let first_char = name . chars ( ) . next ( ) . expect ( " " ) ; let mut prev_case = Case :: from ( first_char ) ; for ( index , character ) in name . char_indices ( ) { let case = Case :: from ( character ) ; let diff = prev_case . diff ( & case ) ; if ( diff == Diff :: Sinking && index - start_index > 1 ) || ( diff == Diff :: CharType ) || ( diff == Diff :: Rising ) { tokens . push ( & name [ start_index .. index ] ) ; start_index = index ; } prev_case = case ; } tokens . push ( & name [ start_index .. ] ) ; tokens }
Tokenize camel case to separate components.
Tokenize camel case to separate components .
name
&'a str