X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/25ef3491bd9ae007ff1fc2b0d7943e6eaaccf775..c8256059947f3aa8f5b0a9a2acf55e2142bb4742:/docs/output/Ext.util.Format.html diff --git a/docs/output/Ext.util.Format.html b/docs/output/Ext.util.Format.html index 0bb4ff91..2b80147e 100644 --- a/docs/output/Ext.util.Format.html +++ b/docs/output/Ext.util.Format.html @@ -1,61 +1,61 @@ -
Package: | Ext.util |
Defined In: | Format.js |
Class: | Format |
Extends: | Object |
Method | Defined By | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
capitalize( String value )
- :
- StringConverts the first character only of a string to upper case Converts the first character only of a string to upper case Parameters:
| Format | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
date( String/Date value , [String format ] )
- :
- StringParse a value into a formatted date using the specified format pattern. Parse a value into a formatted date using the specified format pattern. Parameters:
| Format | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
dateRenderer( String format )
- :
- FunctionReturns a date rendering function that can be reused to apply a date format multiple times efficiently Returns a date rendering function that can be reused to apply a date format multiple times efficiently Parameters:
| Format | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
defaultValue( Mixed value , String defaultValue )
- :
- StringChecks a reference and converts it to the default value if it's empty Checks a reference and converts it to the default value if it's empty Parameters:
| Format | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ellipsis( String value , Number length , Boolean word )
- :
- StringTruncate a string and add an ellipsis ('...') to the end if it exceeds the specified length Truncate a string and add an ellipsis ('...') to the end if it exceeds the specified length Parameters:
| Format | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
fileSize( Number/String size )
- :
- StringSimple format for a file size (xxx bytes, xxx KB, xxx MB) Simple format for a file size (xxx bytes, xxx KB, xxx MB) Parameters:
| Format | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
htmlDecode( String value )
- :
- StringConvert certain characters (&, <, >, and ') from their HTML character equivalents. Convert certain characters (&, <, >, and ') from their HTML character equivalents. Parameters:
| Format | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
htmlEncode( String value )
- :
- StringConvert certain characters (&, <, >, and ') to their HTML character equivalents for literal display in web pages. Convert certain characters (&, <, >, and ') to their HTML character equivalents for literal display in web pages. Parameters:
| Format | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
lowercase( String value )
- :
- StringConverts a string to all lower case letters Converts a string to all lower case letters Parameters:
| Format | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
math()
- :
- Function It does simple math for use in a template, for example:var tpl = new Ext.Template('{value} * 10 = {value:math("* 10")... It does simple math for use in a template, for example:
Parameters:
| Format | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
nl2br( String The )
- :
- StringConverts newline characters to the HTML tag <br/> Converts newline characters to the HTML tag <br/> Parameters:
| Format | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
number( Number v , String format )
- :
- StringFormats the number according to the format string.
-<div style="margin-left:40px">examples (123456.789):
-<div style=... Formats the number according to the format string.
- examples (123456.789):
-
-0 - (123456) show only digits, no precision -0.00 - (123456.78) show only digits, 2 precision -0.0000 - (123456.7890) show only digits, 4 precision -0,000 - (123,456) show comma and digits, no precision -0,000.00 - (123,456.78) show comma and digits, 2 precision -0,0.00 - (123,456.78) shortcut method, show comma and digits, 2 precision -To reverse the grouping (,) and decimal (.) for international numbers, add /i to the end. -For example: 0.000,00/i - Parameters:
| Format | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
numberRenderer( String format )
- :
- FunctionReturns a number rendering function that can be reused to apply a number format multiple times efficiently Returns a number rendering function that can be reused to apply a number format multiple times efficiently Parameters:
| Format | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
plural( Number value , String singular , [String plural ] )
- :
- voidSelectively do a plural form of a word based on a numeric value. For example, in a template,
-{commentCount:plural("C... Selectively do a plural form of a word based on a numeric value. For example, in a template,
-{commentCount:plural("Comment")} would result in "1 Comment" if commentCount was 1 or would be "x Comments"
-if the value is 0 or greater than 1. Parameters:
| Format | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
round( Number/String value , Number precision )
- :
- NumberRounds the passed number to the required decimal precision. Rounds the passed number to the required decimal precision. Parameters:
| Format | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
stripScripts( Mixed value )
- :
- StringStrips all script tags Strips all script tags Parameters:
| Format | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
stripTags( Mixed value )
- :
- StringStrips all HTML tags Strips all HTML tags Parameters:
| Format | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
substr( String value , Number start , Number length )
- :
- StringReturns a substring from within an original string Returns a substring from within an original string Parameters:
| Format | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
trim( String value )
- :
- StringTrims any whitespace from either side of a string Trims any whitespace from either side of a string Parameters:
| Format | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
undef( Mixed value )
- :
- MixedChecks a reference and converts it to empty string if it is undefined Checks a reference and converts it to empty string if it is undefined Parameters:
| Format | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
uppercase( String value )
- :
- StringConverts a string to all upper case letters Converts a string to all upper case letters Parameters:
| Format | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
usMoney( Number/String value )
- :
+Class Ext.util.Format
Reusable data formatting functions This class is a singleton and cannot be created directly. Public PropertiesThis class has no public properties. Public Methods
Public EventsThis class has no public events. |