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

Function Capitalize

Script/Parser.js:685–694  ·  view source on GitHub ↗
(cnt,para)

Source from the content-addressed store, hash-verified

683
684//大小写
685function Capitalize(cnt,para) {
686 if (para == 1) {
687 cnt = cnt.split("tag=")[0] +"tag="+ cnt.split("tag=")[1].toUpperCase()
688 } else if (para == -1) {
689 cnt = cnt.split("tag=")[0] +"tag="+ cnt.split("tag=")[1].toLowerCase()
690 } else if (para == 0) {
691 cnt =cnt.split("tag=")[0] +"tag="+titleCase(cnt.split("tag=")[1])
692 }
693 return cnt
694}
695
696function titleCase(str) {
697 var newStr = str.split(" ");

Callers 1

TagCheck_QXFunction · 0.85

Calls 1

titleCaseFunction · 0.85

Tested by

no test coverage detected