Answers for "string to pascal case"

1

string to pascal case

function toPascalCase(str){
    return (' ' + str).toLowerCase().replace(/[^a-zA-Z0-9]+(.)/g, (m, chr) => {
        return chr.toUpperCase()});
}
Posted by: Guest on April-09-2022

Code answers related to "Javascript"

Browse Popular Code Answers by Language