String.prototype.toJadenCase = function () {
return this.split(‘ ‘).map(function(value, index) {
let arr = value.split(‘‘);
let val = value[0].toUpperCase() + value.slice(1);
return val;
}).join(‘ ‘);
};
本文转载自:http://www.cnblogs.com/Uncle-Keith/p/6230918.html
时间: 2024-09-29 02:58:39