Ext.data.JsonP.Ext_util_Format({"mixins":[],"code_type":"nop","inheritable":false,"component":false,"meta":{},"mixedInto":[],"uses":[],"aliases":{},"parentMixins":[],"superclasses":[],"members":{"event":[],"property":[{"meta":{},"owner":"Ext.util.Format","tagname":"property","name":"currencyAtEnd","id":"property-currencyAtEnd"},{"meta":{},"owner":"Ext.util.Format","tagname":"property","name":"currencyPrecision","id":"property-currencyPrecision"},{"meta":{},"owner":"Ext.util.Format","tagname":"property","name":"currencySign","id":"property-currencySign"},{"meta":{},"owner":"Ext.util.Format","tagname":"property","name":"decimalSeparator","id":"property-decimalSeparator"},{"meta":{},"owner":"Ext.util.Format","tagname":"property","name":"thousandSeparator","id":"property-thousandSeparator"}],"css_var":[],"method":[{"meta":{},"owner":"Ext.util.Format","tagname":"method","name":"capitalize","id":"method-capitalize"},{"meta":{},"owner":"Ext.util.Format","tagname":"method","name":"currency","id":"method-currency"},{"meta":{},"owner":"Ext.util.Format","tagname":"method","name":"date","id":"method-date"},{"meta":{},"owner":"Ext.util.Format","tagname":"method","name":"dateRenderer","id":"method-dateRenderer"},{"meta":{},"owner":"Ext.util.Format","tagname":"method","name":"defaultValue","id":"method-defaultValue"},{"meta":{},"owner":"Ext.util.Format","tagname":"method","name":"ellipsis","id":"method-ellipsis"},{"meta":{},"owner":"Ext.util.Format","tagname":"method","name":"escapeRegex","id":"method-escapeRegex"},{"meta":{},"owner":"Ext.util.Format","tagname":"method","name":"fileSize","id":"method-fileSize"},{"meta":{},"owner":"Ext.util.Format","tagname":"method","name":"format","id":"method-format"},{"meta":{},"owner":"Ext.util.Format","tagname":"method","name":"htmlDecode","id":"method-htmlDecode"},{"meta":{},"owner":"Ext.util.Format","tagname":"method","name":"htmlEncode","id":"method-htmlEncode"},{"meta":{},"owner":"Ext.util.Format","tagname":"method","name":"leftPad","id":"method-leftPad"},{"meta":{},"owner":"Ext.util.Format","tagname":"method","name":"lowercase","id":"method-lowercase"},{"meta":{},"owner":"Ext.util.Format","tagname":"method","name":"math","id":"method-math"},{"meta":{},"owner":"Ext.util.Format","tagname":"method","name":"nl2br","id":"method-nl2br"},{"meta":{},"owner":"Ext.util.Format","tagname":"method","name":"number","id":"method-number"},{"meta":{},"owner":"Ext.util.Format","tagname":"method","name":"numberRenderer","id":"method-numberRenderer"},{"meta":{},"owner":"Ext.util.Format","tagname":"method","name":"parseBox","id":"method-parseBox"},{"meta":{},"owner":"Ext.util.Format","tagname":"method","name":"plural","id":"method-plural"},{"meta":{},"owner":"Ext.util.Format","tagname":"method","name":"round","id":"method-round"},{"meta":{},"owner":"Ext.util.Format","tagname":"method","name":"stripScripts","id":"method-stripScripts"},{"meta":{},"owner":"Ext.util.Format","tagname":"method","name":"stripTags","id":"method-stripTags"},{"meta":{},"owner":"Ext.util.Format","tagname":"method","name":"substr","id":"method-substr"},{"meta":{},"owner":"Ext.util.Format","tagname":"method","name":"trim","id":"method-trim"},{"meta":{},"owner":"Ext.util.Format","tagname":"method","name":"undef","id":"method-undef"},{"meta":{},"owner":"Ext.util.Format","tagname":"method","name":"uppercase","id":"method-uppercase"},{"meta":{},"owner":"Ext.util.Format","tagname":"method","name":"usMoney","id":"method-usMoney"}],"css_mixin":[],"cfg":[]},"tagname":"class","extends":null,"html":"
Files
This class is a centralized place for formatting functions. It includes\nfunctions to format various different types of data, such as text, dates and numeric values.
\n\nThis class contains several options for localization. These can be set once the library has loaded,\nall calls to the functions from that point will use the locale settings that were specified.
\n\nOptions include:
\n\nThis class also uses the default date format defined here: Ext.Date.defaultFormat.
\n\nThere are two helper functions that return a new function that can be used in conjunction with\ngrid renderers:
\n\ncolumns: [{\n dataIndex: 'date',\n renderer: Ext.util.Format.dateRenderer('Y-m-d')\n}, {\n dataIndex: 'time',\n renderer: Ext.util.Format.numberRenderer('0.000')\n}]\n
\n\nFunctions that only take a single argument can also be passed directly:
\n\ncolumns: [{\n dataIndex: 'cost',\n renderer: Ext.util.Format.usMoney\n}, {\n dataIndex: 'productCode',\n renderer: Ext.util.Format.uppercase\n}]\n
\n\nXTemplates can also directly use Ext.util.Format functions:
\n\nnew Ext.XTemplate([\n 'Date: {startDate:date(\"Y-m-d\")}',\n 'Cost: {cost:usMoney}'\n]);\n
\nThis may be set to true
to make the currency function\nappend the currency sign to the formatted value.
This may be overridden in a locale file.
\nDefaults to: false
The number of decimal places that the currency function displays.
\n\nThis may be overridden in a locale file.
\nDefaults to: 2
The currency sign that the currency function displays.
\n\nThis may be overridden in a locale file.
\nDefaults to: "$"
The character that the number function uses as a decimal point.
\n\nThis may be overridden in a locale file.
\nDefaults to: "."
The character that the number function uses as a thousand separator.
\n\nThis may be overridden in a locale file.
\nDefaults to: ","
Alias for Ext.String.capitalize.
\n\nCapitalize the given string
\nFormat a number as a currency.
\nThe numeric value to format
\nThe currency sign to use (defaults to currencySign)
\nThe number of decimals to use for the currency\n(defaults to currencyPrecision)
\nTrue if the currency sign should be at the end of the string\n(defaults to currencyAtEnd)
\nThe formatted currency string
\nFormats the passed date using the specified format pattern.
\nThe value to format. If a string is passed, it is converted to a Date\nby the Javascript's built-in Date.parse method.
\nAny valid date format string. Defaults to Ext.Date.defaultFormat.
\nThe formatted date string.
\nReturns a date rendering function that can be reused to apply a date format multiple times efficiently.
\nAny valid date format string. Defaults to Ext.Date.defaultFormat.
\nThe date formatting function
\nAlias for Ext.String.ellipsis.
\n\nTruncate a string and add an ellipsis ('...') to the end if it exceeds the specified length
\nThe string to truncate
\nThe maximum length to allow before truncating
\nTrue to try to find a common word break
\nThe converted text
\nAlias for Ext.String.format.
\n\nAllows you to define a tokenized string and pass an arbitrary number of arguments to replace the tokens. Each\ntoken must be unique, and must increment in the format {0}, {1}, etc. Example usage:
\n\n var cls = 'my-class', text = 'Some text';\n var s = Ext.String.format('<div class=\"{0}\">{1}</div>', cls, text);\n // s now contains the string: '<div class=\"my-class\">Some text</div>'\n
\n\nThe tokenized string to be formatted
\nThe value to replace token {0}
\nEtc...
\nThe formatted string
\nAlias for Ext.String.htmlDecode.
\n\nConvert certain characters (&, <, >, ', and \") from their HTML character equivalents.
\nThe string to decode
\nThe decoded text
\nAlias for Ext.String.htmlEncode.
\n\nConvert certain characters (&, <, >, ', and \") to their HTML character equivalents for literal display in web pages.
\nThe string to encode
\nThe encoded text
\nAlias for Ext.String.leftPad.
\n\nPads the left side of a string with a specified character. This is especially useful\nfor normalizing number and date strings. Example usage:
\n\n var s = Ext.String.leftPad('123', 5, '0');\n // s now contains the string: '00123'\n
\n\nThe original string
\nThe total length of the output string
\nThe character with which to pad the original string (defaults to empty string \" \")
\nThe padded string
\nIt does simple math for use in a template, for example:
\n\nvar tpl = new Ext.Template('{value} * 10 = {value:math(\"* 10\")}');\n
\nA function that operates on the passed value.
\nFormats the passed number according to the passed format string.
\n\nThe number of digits after the decimal separator character specifies the number of\ndecimal places in the resulting string. The local-specific decimal character is\nused in the result.
\n\nThe presence of a thousand separator character in the format string specifies that\nthe locale-specific thousand separator (if any) is inserted separating thousand groups.
\n\nBy default, \",\" is expected as the thousand separator, and \".\" is expected as the decimal separator.
\n\nLocale-specific characters are always used in the formatted output when inserting\nthousand and decimal separators.
\n\nThe format string must specify separator characters according to US/UK conventions (\",\" as the\nthousand separator, and \".\" as the decimal separator)
\n\nTo allow specification of format strings according to local conventions for separator characters, add\nthe string /i
to the end of the format string.
examples (123456.789):
\n\n0
- (123456) show only digits, no precision0.00
- (123456.78) show only digits, 2 precision0.0000
- (123456.7890) show only digits, 4 precision0,000
- (123,456) show comma and digits, no precision0,000.00
- (123,456.78) show comma and digits, 2 precision0,0.00
- (123,456.78) shortcut method, show comma and digits, 2 precisionTo allow specification of the formatting string using UK/US grouping characters (,) and\ndecimal (.) for international numbers, add /i to the end. For example: 0.000,00/i
\nThe formatted number.
\nParses a number or string representing margin sizes into an object.\nSupports CSS-style margin declarations (e.g. 10, \"10\", \"10 10\", \"10 10 10\" and\n\"10 10 10 10\" are all valid options and would return the same result).
\nAn object with margin sizes for top, right, bottom and left
\nSelectively do a plural form of a word based on a numeric value. For example, in a template,\n{commentCount:plural(\"Comment\")}
would result in \"1 Comment\"
if commentCount was 1 or\nwould be \"x Comments\"
if the value is 0 or greater than 1.
Alias for Ext.String.trim.
\n\nTrims whitespace from either end of a string, leaving spaces within the string intact. Example:\n@example
\n\nvar s = ' foo bar ';\nalert('-' + s + '-'); //alerts \"- foo bar -\"\nalert('-' + Ext.String.trim(s) + '-'); //alerts \"-foo bar-\"\n
\nThe string to escape
\nThe trimmed string
\n