pub fn camel_case_to_hyphen(text: &str, replacement: char) -> StringExpand description
music21’s common.camelCaseToHyphen: a camel-cased name as words joined
by replacement, lower case. A capital that starts a run of lower-case
letters is set apart first, then any capital following a lower-case
letter or a digit, which is the pair of substitutions music21 makes.
use music21::common::stringtools::camel_case_to_hyphen;
assert_eq!(camel_case_to_hyphen("MovementName", '-'), "movement-name");
assert_eq!(camel_case_to_hyphen("fileName", '_'), "file_name");