[ Index ] |
PHP Cross Reference of MediaWiki-1.24.0 |
[Source view] [Print] [Project Stats]
(no description)
File Size: | 258 lines (7 kb) |
Included or required: | 0 times |
Referenced: | 1 time |
Includes or requires: | 0 files |
pad( text, size, ch, end ) X-Ref |
Pad a string to guarantee that it is at least `size` length by filling with the character `ch` at either the start or end of the string. Pads at the start, by default. Example: Fill the string to length 10 with '+' characters on the right. pad( 'blah', 10, '+', true ); // => 'blah++++++' param: {string} text The string to pad param: {number} size The length to pad to param: {string} [ch='0'] Character to pad with param: {boolean} [end=false] Adds padding at the end if true, otherwise pads at start return: {string} |
replicate( str, num ) X-Ref |
Replicate a string 'n' times. param: {string} str The string to replicate param: {number} num Number of times to replicate the string return: {string} |
commafyNumber( value, pattern, options ) X-Ref |
Apply numeric pattern to absolute value using options. Gives no consideration to local customs. Adapted from dojo/number library with thanks <http://dojotoolkit.org/reference-guide/1.8/dojo/number.html> param: {number} value the number to be formatted, ignores sign param: {string} pattern the number portion of a pattern (e.g. `#,##0.00`) param: {Object} [options] If provided, both option keys must be present: param: {string} options.decimal The decimal separator. Defaults to: `'.'`. param: {string} options.group The group separator. Defaults to: `','`. return: {string} |
Generated: Fri Nov 28 14:03:12 2014 | Cross-referenced by PHPXref 0.7.1 |