Function clippy_utils::str_utils::camel_case_indices

source ยท
pub fn camel_case_indices(s: &str) -> Vec<StrIndex>
Expand description

Get the indexes of camel case components of a string s

assert_eq!(
    camel_case_indices("AbcDef"),
    vec![StrIndex::new(0, 0), StrIndex::new(3, 3), StrIndex::new(6, 6)]
);
assert_eq!(
    camel_case_indices("abcDef"),
    vec![StrIndex::new(3, 3), StrIndex::new(6, 6)]
);