+ return Ext.isEmpty(v) ? '' : v.replace(nl2brRe, '<br/>');
+ },
+
+<span id='Ext-util-Format-method-capitalize'> /**
+</span> * Alias for {@link Ext.String#capitalize}.
+ * @method
+ * @alias Ext.String#capitalize
+ */
+ capitalize: Ext.String.capitalize,
+
+<span id='Ext-util-Format-method-ellipsis'> /**
+</span> * Alias for {@link Ext.String#ellipsis}.
+ * @method
+ * @alias Ext.String#ellipsis
+ */
+ ellipsis: Ext.String.ellipsis,
+
+<span id='Ext-util-Format-method-format'> /**
+</span> * Alias for {@link Ext.String#format}.
+ * @method
+ * @alias Ext.String#format
+ */
+ format: Ext.String.format,
+
+<span id='Ext-util-Format-method-htmlDecode'> /**
+</span> * Alias for {@link Ext.String#htmlDecode}.
+ * @method
+ * @alias Ext.String#htmlDecode
+ */
+ htmlDecode: Ext.String.htmlDecode,
+
+<span id='Ext-util-Format-method-htmlEncode'> /**
+</span> * Alias for {@link Ext.String#htmlEncode}.
+ * @method
+ * @alias Ext.String#htmlEncode
+ */
+ htmlEncode: Ext.String.htmlEncode,
+
+<span id='Ext-util-Format-method-leftPad'> /**
+</span> * Alias for {@link Ext.String#leftPad}.
+ * @method
+ * @alias Ext.String#leftPad
+ */
+ leftPad: Ext.String.leftPad,
+
+<span id='Ext-util-Format-method-trim'> /**
+</span> * Alias for {@link Ext.String#trim}.
+ * @method
+ * @alias Ext.String#trim
+ */
+ trim : Ext.String.trim,
+
+<span id='Ext-util-Format-method-parseBox'> /**
+</span> * Parses a number or string representing margin sizes into an object. Supports CSS-style margin declarations
+ * (e.g. 10, "10", "10 10", "10 10 10" and "10 10 10 10" are all valid options and would return the same result)
+ * @param {Number/String} v The encoded margins
+ * @return {Object} An object with margin sizes for top, right, bottom and left
+ */
+ parseBox : function(box) {
+ if (Ext.isNumber(box)) {
+ box = box.toString();
+ }
+ var parts = box.split(' '),
+ ln = parts.length;
+
+ if (ln == 1) {
+ parts[1] = parts[2] = parts[3] = parts[0];
+ }
+ else if (ln == 2) {
+ parts[2] = parts[0];
+ parts[3] = parts[1];
+ }
+ else if (ln == 3) {
+ parts[3] = parts[1];
+ }
+
+ return {
+ top :parseInt(parts[0], 10) || 0,
+ right :parseInt(parts[1], 10) || 0,
+ bottom:parseInt(parts[2], 10) || 0,
+ left :parseInt(parts[3], 10) || 0
+ };
+ },
+
+<span id='Ext-util-Format-method-escapeRegex'> /**
+</span> * Escapes the passed string for use in a regular expression
+ * @param {String} str
+ * @return {String}
+ */
+ escapeRegex : function(s) {
+ return s.replace(/([\-.*+?\^${}()|\[\]\/\\])/g, "\\$1");