mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 18:55:26 +00:00
feature(util) add getStrBigFirst
This commit is contained in:
parent
be183877a0
commit
94ff0e9ab4
1 changed files with 12 additions and 0 deletions
12
lib/util.js
12
lib/util.js
|
|
@ -303,6 +303,18 @@ Util = exports || {};
|
|||
|
||||
};
|
||||
|
||||
Util.getStrBigFirst = function(pStr) {
|
||||
var lRet;
|
||||
|
||||
if (Util.isString(pStr) && pStr.length > 0)
|
||||
lRet = pStr[0].toUpperCase() +
|
||||
pStr.substring(1);
|
||||
else
|
||||
lRet = pStr;
|
||||
|
||||
return lRet;
|
||||
};
|
||||
|
||||
/**
|
||||
* function returns is pStr1 contains pStr2
|
||||
* @param pStr1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue