Answers for "camelcase"

0

camelcase

String.prototype.toCamelCase = function () {
	let STR = this.toLowerCase()
		.trim()
		.split(/[ -_]/g)
		.map(word => word.replace(word[0], word[0].toString().toUpperCase()))
		.join('');
	return STR.replace(STR[0], STR[0].toLowerCase());
};
Posted by: Guest on August-01-2021
0

camelcase

String.prototype.camelCase=function(){
   return this.split(/[ -_]/g).map(function(word){
    return word.charAt(0).toUpperCase() + word.slice(1);
  }).join('');
}
Posted by: Guest on August-26-2021
-1

convert a camel case to string

convert camel case to string
Posted by: Guest on November-22-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language