private String sanitizeCssPropertyName ( final String propertyName ) { if ( ! propertyName . contains ( "-" ) ) { return propertyName ; } else { String sanitized = propertyName ; int index = sanitized . indexOf ( ' ' ) ; while ( index != - 1 ) { String charToBeReplaced = sanitized . substring ( index + 1 , index + 2 ) ; String replacement = charToBeReplaced . toUpperCase ( ) ; sanitized = sanitized . replaceAll ( "-" + charToBeReplaced , replacement ) ; index = sanitized . indexOf ( ' ' ) ; } return sanitized ; } }
Replaces hyphen notation with camel case notation .