New function: to convert hyphenated strings