feature(util) rm isContainStr

This commit is contained in:
coderaiser 2014-10-28 09:41:14 -04:00
parent ad87145c42
commit 5d4db87a96
5 changed files with 10 additions and 46 deletions

View file

@ -235,40 +235,6 @@
return ret;
};
/**
* function returns is str1 contains str2
* @param str1
* @param str2
*/
this.isContainStr = function(str1, str2) {
var i, n, str, is, index,
isStr = Util.type.string(str1),
type = Util.type(str2);
if (isStr)
switch (type) {
case 'array':
n = str2.length;
for (i = 0; i < n; i++) {
str = str2[i];
is = Util.isContainStr(str1, str);
if (is)
break;
}
break;
case 'string':
index = str1.indexOf(str2);
is = index >= 0;
break;
}
return is;
};
/**
* function log pArg if it's not empty
* @param pArg