MCPcopy Create free account
hub / github.com/unconed/TermKit / padNumber

Function padNumber

HTML/external/syntaxhighlighter_3.0.83/src/shCore.js:833–841  ·  view source on GitHub ↗

* Pads number with zeros until it's length is the same as given length. * * @param {Number} number Number to pad. * @param {Number} length Max string length with. * @return {String} Returns a string padded with proper amount of '0'.

(number, length)

Source from the content-addressed store, hash-verified

831 * @return {String} Returns a string padded with proper amount of '0'.
832 */
833function padNumber(number, length)
834{
835 var result = number.toString();
836
837 while (result.length < length)
838 result = '0' + result;
839
840 return result;
841};
842
843/**
844 * Replaces tabs with spaces.

Callers 1

shCore.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected