| capitalize( String value )
+Reusable data formatting functions
This class is a singleton and cannot be created directly. Public PropertiesThis class has no public properties. Public Methods|
| 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:value : StringThe text to convert Returns: | Format | | date( String/Date value , [String format ] )
:
@@ -22,26 +22,26 @@
:
StringConverts newline characters to the HTML tag <br/> Converts newline characters to the HTML tag <br/> Parameters:The : Stringstring value to format. Returns: | 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
+ String Formats the number according to the format string.
+<div style="margin-left:40px">examples (123456.789):
+<div style="m... 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:Returns:String The formatted number.
| 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 : StringAny valid number format string for number Returns: | 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"
+ void Selectively do a plural form of a word based on a numeric value. For example, in a template,
+{commentCount:plural("Co... 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:value : NumberThe value to compare against singular : StringThe singular form of the word plural : String(optional) The plural form of the word (defaults to the singular with an "s") Returns: | 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. | Format | | stripScripts( Mixed value )
|
|