summaryrefslogtreecommitdiff
path: root/lib/dojo/string.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2013-03-18 10:26:24 +0400
committerAndrew Dolgov <[email protected]>2013-03-18 10:26:26 +0400
commitf0cfe83e3725f9a3928da97a6e3085e79cb25309 (patch)
tree4b0af188defaa807c7bc6ff3a101b41c9166c463 /lib/dojo/string.js
parent9a2885da170ffd64358b99194095851a2d09c1b6 (diff)
upgrade dojo to 1.8.3 (refs #570)
Diffstat (limited to 'lib/dojo/string.js')
-rw-r--r--lib/dojo/string.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/dojo/string.js b/lib/dojo/string.js
index 0b8ce6f4c..e3ba622a8 100644
--- a/lib/dojo/string.js
+++ b/lib/dojo/string.js
@@ -1,8 +1,8 @@
/*
- Copyright (c) 2004-2011, The Dojo Foundation All Rights Reserved.
+ Copyright (c) 2004-2012, The Dojo Foundation All Rights Reserved.
Available via Academic Free License >= 2.1 OR the modified BSD license.
see: http://dojotoolkit.org/license for details
*/
//>>built
-define("dojo/string",["./_base/kernel","./_base/lang"],function(_1,_2){_2.getObject("string",true,_1);_1.string.rep=function(_3,_4){if(_4<=0||!_3){return "";}var _5=[];for(;;){if(_4&1){_5.push(_3);}if(!(_4>>=1)){break;}_3+=_3;}return _5.join("");};_1.string.pad=function(_6,_7,ch,_8){if(!ch){ch="0";}var _9=String(_6),_a=_1.string.rep(ch,Math.ceil((_7-_9.length)/ch.length));return _8?_9+_a:_a+_9;};_1.string.substitute=function(_b,_c,_d,_e){_e=_e||_1.global;_d=_d?_2.hitch(_e,_d):function(v){return v;};return _b.replace(/\$\{([^\s\:\}]+)(?:\:([^\s\:\}]+))?\}/g,function(_f,key,_10){var _11=_2.getObject(key,false,_c);if(_10){_11=_2.getObject(_10,false,_e).call(_e,_11,key);}return _d(_11,key).toString();});};_1.string.trim=String.prototype.trim?_2.trim:function(str){str=str.replace(/^\s+/,"");for(var i=str.length-1;i>=0;i--){if(/\S/.test(str.charAt(i))){str=str.substring(0,i+1);break;}}return str;};return _1.string;}); \ No newline at end of file
+define("dojo/string",["./_base/kernel","./_base/lang"],function(_1,_2){var _3={};_2.setObject("dojo.string",_3);_3.rep=function(_4,_5){if(_5<=0||!_4){return "";}var _6=[];for(;;){if(_5&1){_6.push(_4);}if(!(_5>>=1)){break;}_4+=_4;}return _6.join("");};_3.pad=function(_7,_8,ch,_9){if(!ch){ch="0";}var _a=String(_7),_b=_3.rep(ch,Math.ceil((_8-_a.length)/ch.length));return _9?_a+_b:_b+_a;};_3.substitute=function(_c,_d,_e,_f){_f=_f||_1.global;_e=_e?_2.hitch(_f,_e):function(v){return v;};return _c.replace(/\$\{([^\s\:\}]+)(?:\:([^\s\:\}]+))?\}/g,function(_10,key,_11){var _12=_2.getObject(key,false,_d);if(_11){_12=_2.getObject(_11,false,_f).call(_f,_12,key);}return _e(_12,key).toString();});};_3.trim=String.prototype.trim?_2.trim:function(str){str=str.replace(/^\s+/,"");for(var i=str.length-1;i>=0;i--){if(/\S/.test(str.charAt(i))){str=str.substring(0,i+1);break;}}return str;};return _3;}); \ No newline at end of file