“Kamelase” Code-Antworten

Kamelase

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());
};
5alidshammout

Kamelase

String.prototype.camelCase=function(){
   return this.split(/[ -_]/g).map(function(word){
    return word.charAt(0).toUpperCase() + word.slice(1);
  }).join('');
}
abdelghanyMh

Konvertieren Sie einen Kamelgehäuse in String

convert camel case to string
Auuntoo

Ähnliche Antworten wie “Kamelase”

Durchsuchen Sie beliebte Code-Antworten nach Sprache

Durchsuchen Sie andere Codesprachen