Public Methods
|
Converts the first character only of a string to upper case
Converts the first character only of a string to upper case
- Parameters:
-
String value
- The text to convert
- Returns:
- String The converted text
|
Roo.util.Format
|
|
Parse a value into a formatted date using the specified format pattern.
Parse a value into a formatted date using the specified format pattern.
- Parameters:
-
Mixed value
- The value to format
-
String format
- (optional) Any valid date format string (defaults to 'm/d/Y')
- Returns:
- String The formatted date string
|
Roo.util.Format
|
|
Returns 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:
-
String format
- Any valid date format string
- Returns:
- Function The date formatting function
|
Roo.util.Format
|
|
Truncate a string and add an ellipsis ('.
Truncate a string and add an ellipsis ('...') to the end if it exceeds the specified length
- Parameters:
-
String value
- The string to truncate
-
Number length
- The maximum length to allow before truncating
- Returns:
- String The converted text
|
Roo.util.Format
|
|
Convert certain characters (&, <, >, and ') from their HTML character equivalents.
Convert certain characters (&, <, >, and ') from their HTML character equivalents.
- Parameters:
-
String value
- The string to decode
- Returns:
- String The decoded text
|
Roo.util.Format
|
|
Convert 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:
-
String value
- The string to encode
- Returns:
- String The encoded text
|
Roo.util.Format
|
|
Converts a string to all lower case letters
Converts a string to all lower case letters
- Parameters:
-
String value
- The text to convert
- Returns:
- String The converted text
|
Roo.util.Format
|
|
Format a number eventually this should probably emulate php's number_format
Format a number eventually this should probably emulate php's number_format
- Parameters:
-
Number/String value
- The numeric value to format
-
Number decimals
- number of decimal places
- Returns:
- String The formatted currency string
|
Roo.util.Format
|
|
Roo.util.Format.stripTags
(Mixed value)
:
String
Strips all HTML tags
Strips all HTML tags
- Parameters:
-
Mixed value
- The text from which to strip tags
- Returns:
- String The stripped text
|
Roo.util.Format
|
|
Returns a substring from within an original string
Returns a substring from within an original string
- Parameters:
-
String value
- The original text
-
Number start
- The start index of the substring
-
Number length
- The length of the substring
- Returns:
- String The substring
|
Roo.util.Format
|
|
safer version of Math.toFixed.
safer version of Math.toFixed..??/
- Parameters:
-
Number/String value
- The numeric value to format
-
Number/String value
- Decimal places
- Returns:
- String The formatted currency string
|
Roo.util.Format
|
|
Trims any whitespace from either side of a string
Trims any whitespace from either side of a string
- Parameters:
-
String value
- The text to trim
- Returns:
- String The trimmed text
|
Roo.util.Format
|
|
Roo.util.Format.undef
(Mixed value)
:
Mixed
Checks 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:
-
Mixed value
- Reference to check
- Returns:
- Mixed Empty string if converted, otherwise the original value
|
Roo.util.Format
|
|
Converts a string to all upper case letters
Converts a string to all upper case letters
- Parameters:
-
String value
- The text to convert
- Returns:
- String The converted text
|
Roo.util.Format
|
|
Format a number as US currency
Format a number as US currency
- Parameters:
-
Number/String value
- The numeric value to format
- Returns:
- String The formatted currency string
|
Roo.util.Format
|