mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-20 18:18:56 +00:00
minor changes
This commit is contained in:
parent
13870902f9
commit
cf8d196b84
2 changed files with 58 additions and 10 deletions
|
|
@ -25,7 +25,39 @@ var CloudFunc = {
|
|||
SHORTNAMELENGTH : 16
|
||||
};
|
||||
|
||||
/*1
|
||||
|
||||
/* STRINGS */
|
||||
|
||||
/**
|
||||
* function check is strings are equal
|
||||
* @param pStr1
|
||||
* @param pStr2
|
||||
*/
|
||||
CloudFunc.strCmp = function (pStr1, pStr2){
|
||||
return this.isContainStr(pStr1, pStr2) &&
|
||||
pStr1.length == pStr2.length;
|
||||
};
|
||||
|
||||
/**
|
||||
* function returns is pStr1 contains pStr2
|
||||
* @param pStr1
|
||||
* @param pStr2
|
||||
*/
|
||||
CloudFunc.isContainStr = function(pStr1, pStr2){
|
||||
return pStr1 &&
|
||||
pStr2 &&
|
||||
pStr1.indexOf(pStr2) >= 0;
|
||||
};
|
||||
|
||||
/**
|
||||
* function remove substring from string
|
||||
* @param pStr
|
||||
* @param pSubStr
|
||||
*/
|
||||
CloudFunc.removeStr = function(pStr, pSubStr){
|
||||
return pStr.replace(pSubStr,'');
|
||||
};
|
||||
/*
|
||||
* Функция убирает последний слеш,
|
||||
* если он - последний символ строки
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue