I wrote a function for lines with a camel casing (the requirement is to expand the characters at the beginning of the word and after each hyphen that targets personal names).
function sadCamelize(input) { return input.toLowerCase().replace(/([-\s])(.)/g, function(match, separator, starter) { return separator + starter.toUpperCase(); }); }
Now I would like to make my camel happy so that even the first character of the line (without succeeding a space or hyphen) is not hacked. Id est, not:
Honka-Honka → honka-Honka
I would like to get
Honka-Honka → Honka-Honka
I'm stuck at the moment, perhaps due to annoyance. All camels are suppressed, and so am I. - What is the correct nomenclature of what I call a sad / happy camel (head down / up)?
source share