summaryrefslogtreecommitdiff
path: root/framework/Web/Javascripts/extended/string.js
diff options
context:
space:
mode:
authorwei <>2006-01-19 07:42:52 +0000
committerwei <>2006-01-19 07:42:52 +0000
commit9275bf0de0e9ccbc5ee9311c9b59efcbfbc01a6a (patch)
tree14c0120ecbcc3dc4c06d9603cce0eb1294d495b9 /framework/Web/Javascripts/extended/string.js
parent5c333928f7f328319f1de4486d5e7ce3a54fc2ce (diff)
Diffstat (limited to 'framework/Web/Javascripts/extended/string.js')
-rw-r--r--framework/Web/Javascripts/extended/string.js5
1 files changed, 1 insertions, 4 deletions
diff --git a/framework/Web/Javascripts/extended/string.js b/framework/Web/Javascripts/extended/string.js
index 9b4c501b..e265edf4 100644
--- a/framework/Web/Javascripts/extended/string.js
+++ b/framework/Web/Javascripts/extended/string.js
@@ -16,10 +16,7 @@ Object.extend(String.prototype, {
},
zerofill : function(len) {
- var s = this;
- var ix = /^[+-]/.test(s) ? 1 : 0;
- while (s.length<len) s = s.insert(ix, '0');
- return s;
+ return this.padLeft(len,'0');
},
trim : function() {