Uncamelcasify!

Have you ever wanted to convert camel case to spaces? Try this code:

function unCamelCasify(text){return text.replace(/[A-Z]/g,function (x){return " " + x.toLowerCase()})}

Example:

unCamelCasify("MrBlueHasABlueHouseAndABlueCar");
// Returns " mr blue has a blue house and a blue car"

Created for this issue

Written on January 5, 2018

In the categories:

camel case

View all my posts: somerandomcharactersthatwillgetpickedupbysearchengines