提交 61794458 编写于 作者: K kohsuke

added back missing trim() method.

See http://www.nabble.com/Sorting-of-projects-tf4371682.html


git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@4613 71c3de6d-444a-0410-be80-ed276b4c234a
上级 305a931e
......@@ -781,4 +781,14 @@ function buildFormTree(form) {
return false;
}
\ No newline at end of file
}
// this used to be in prototype.js but it must have been removed somewhere between 1.4.0 to 1.5.1
String.prototype.trim = function() {
var temp = this;
var obj = /^(\s*)([\W\w]*)(\b\s*$)/;
if (obj.test(temp)) { temp = temp.replace(obj, '$2'); }
obj = / /g;
while (temp.match(obj)) { temp = temp.replace(obj, " "); }
return temp;
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册