Skip to content

Commit 1f7490e

Browse files
authored
Update index.js
1 parent 5f7aa66 commit 1f7490e

File tree

1 file changed

+13
-0
lines changed
  • Bundle/Resources/public/strategy

1 file changed

+13
-0
lines changed

Bundle/Resources/public/strategy/index.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,3 +95,16 @@ function urlPreprocess(url) {
9595
var reg = new RegExp("amp;","g");
9696
return url.replace(reg, '');
9797
}
98+
99+
/**
100+
* 处理多行文本
101+
*
102+
* 定义使用方式 https://www.cnblogs.com/starlet/archive/2010/05/24/1742572.html
103+
*
104+
* @returns {String}
105+
*/
106+
Function.prototype.getMultiLine = function() {
107+
var lines = new String(this);
108+
lines = lines.substring(lines.indexOf("/*") + 3, lines.lastIndexOf("*/"));
109+
return lines;
110+
}

0 commit comments

Comments
 (0)