MCPcopy Create free account
hub / github.com/Moli-X/Resources / titleCase

Function titleCase

Script/Parser.js:696–701  ·  view source on GitHub ↗
(str)

Source from the content-addressed store, hash-verified

694}
695
696function titleCase(str) {
697 var newStr = str.split(" ");
698 for(var i = 0; i<newStr.length; i++){
699 newStr[i] = newStr[i].slice(0,1).toUpperCase() + newStr[i].slice(1).toLowerCase();
700 } return newStr.join(" ");
701}
702
703
704// 类型前缀/后缀

Callers 1

CapitalizeFunction · 0.85

Calls 1

joinMethod · 0.45

Tested by

no test coverage detected