summaryrefslogtreecommitdiff
path: root/lib/dojo/string.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2011-11-08 20:40:44 +0400
committerAndrew Dolgov <[email protected]>2011-11-08 20:40:44 +0400
commit81bea17aefb26859f825b9293c7c99192874806e (patch)
treefb244408ca271affa2899adb634788802c9a89d8 /lib/dojo/string.js
parent870a70e109ac9e80a88047044530de53d0404ec7 (diff)
upgrade Dojo to 1.6.1
Diffstat (limited to 'lib/dojo/string.js')
-rw-r--r--lib/dojo/string.js22
1 files changed, 12 insertions, 10 deletions
diff --git a/lib/dojo/string.js b/lib/dojo/string.js
index 1eba34043..2e1cc5015 100644
--- a/lib/dojo/string.js
+++ b/lib/dojo/string.js
@@ -1,5 +1,5 @@
/*
- Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved.
+ Copyright (c) 2004-2011, 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
*/
@@ -9,8 +9,10 @@ if(!dojo._hasResource["dojo.string"]){ //_hasResource checks added by build. Do
dojo._hasResource["dojo.string"] = true;
dojo.provide("dojo.string");
+dojo.getObject("string", true, dojo);
+
/*=====
-dojo.string = {
+dojo.string = {
// summary: String utilities for Dojo
};
=====*/
@@ -61,22 +63,22 @@ dojo.string.pad = function(/*String*/text, /*Integer*/size, /*String?*/ch, /*Boo
return end ? out + pad : pad + out; // String
};
-dojo.string.substitute = function( /*String*/ template,
- /*Object|Array*/map,
- /*Function?*/ transform,
+dojo.string.substitute = function( /*String*/ template,
+ /*Object|Array*/map,
+ /*Function?*/ transform,
/*Object?*/ thisObject){
// summary:
// Performs parameterized substitutions on a string. Throws an
// exception if any parameter is unmatched.
- // template:
+ // template:
// a string with expressions in the form `${key}` to be replaced or
- // `${key:format}` which specifies a format function. keys are case-sensitive.
+ // `${key:format}` which specifies a format function. keys are case-sensitive.
// map:
// hash to search for substitutions
- // transform:
+ // transform:
// a function to process all parameters before substitution takes
// place, e.g. mylib.encodeXML
- // thisObject:
+ // thisObject:
// where to look for optional format function; default to the global
// namespace
// example:
@@ -119,7 +121,7 @@ dojo.string.substitute = function( /*String*/ template,
// | );
thisObject = thisObject || dojo.global;
- transform = transform ?
+ transform = transform ?
dojo.hitch(thisObject, transform) : function(v){ return v; };
return template.replace(/\$\{([^\s\:\}]+)(?:\:([^\s\:\}]+))?\}/g,