feature(cloudfunc) rm: addNewLine, rmNewLine

This commit is contained in:
coderaiser 2014-10-29 05:24:52 -04:00
parent 548bb8d7f1
commit cb4f2e1b41

View file

@ -32,31 +32,6 @@ var Util;
this.CHANNEL_TERMINAL_RESIZE= 'terminal-resize';
this.MAX_FILE_SIZE = 500 * 1024;
/**
* ad new line (if it's not)
* @param {string} pText
*/
this.addNewLine = function(text) {
var newLine = '',
n = text && text.length;
if(n && text[n-1] !== '\n')
newLine = '\n';
return text + newLine;
};
/**
* rm new line (if it's)
* @param {string} pText
*/
this.rmNewLine = function(text) {
var strs = ['\n', '\r'],
str = Util.rmStr(text, strs);
return str;
};
this.getStrBigFirst = function(str) {
var isStr = Util.type.string(str),
ret = str;