feature(util) mv getStrBigFirst to CloudFunc

This commit is contained in:
coderaiser 2014-10-29 05:23:29 -04:00
parent 866aa0456d
commit 548bb8d7f1
3 changed files with 12 additions and 12 deletions

View file

@ -83,7 +83,7 @@ var Util, DOM, CloudFunc, join;
doBefore = params.dobefore;
if (path && !name) {
name = Util.getStrBigFirst(path);
name = CloudFunc.getStrBigFirst(path);
name = Util.rmStr(name, '.js');
slash = name.indexOf('/');
@ -166,7 +166,7 @@ var Util, DOM, CloudFunc, join;
if (path) {
module = query[0];
module = Util.slice(module, 1).join('');
module = Util.getStrBigFirst(module);
module = CloudFunc.getStrBigFirst(module);
file = query[1];
current = DOM.getCurrentByName(file);

View file

@ -57,6 +57,16 @@ var Util;
return str;
};
this.getStrBigFirst = function(str) {
var isStr = Util.type.string(str),
ret = str;
if (isStr && str.length)
ret = str[0].toUpperCase() + str.substring(1);
return ret;
};
this.formatMsg = function(msg, name, status) {
if (!status)
status = 'ok';

View file

@ -225,16 +225,6 @@
};
this.getStrBigFirst = function(str) {
var isStr = Util.type.string(str),
ret = str;
if (isStr && str.length)
ret = str[0].toUpperCase() + str.substring(1);
return ret;
};
/**
* function log pArg if it's not empty
* @param pArg