From 7e6c109ab6998c853ab21ee4ab16a947f86beff5 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Wed, 25 Dec 2013 09:11:10 +0000 Subject: [PATCH] feature(util) add getStrSmallfirst --- lib/util.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lib/util.js b/lib/util.js index 8716c1f8..be5ac7f2 100644 --- a/lib/util.js +++ b/lib/util.js @@ -381,6 +381,18 @@ return lRet; }; + this.getStrSmallFirst = function(pStr) { + var lRet; + + if (Util.isString(pStr) && pStr.length > 0) + lRet = pStr[0].toLowerCase() + + pStr.substring(1); + else + lRet = pStr; + + return lRet; + }; + /** * function returns is pStr1 contains pStr2 * @param pStr1