Created
March 7, 2014 00:42
-
-
Save d-simon/9402826 to your computer and use it in GitHub Desktop.
Revisions
-
d-simon revised this gist
Mar 18, 2014 . 1 changed file with 6 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,6 @@ function padString (str, width, paddingStr) { paddingStr = paddingStr || '0'; str = str + ''; while (str.length < width) { str = paddingStr + str; } return str; } -
d-simon revised this gist
Mar 18, 2014 . 1 changed file with 5 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ function pad (n, width, z) { z = z || '0'; n = n + ''; while (n.length < width) { n = z + n; } return n; } -
d-simon created this gist
Mar 7, 2014 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,6 @@ function pad(n, width, z) { z = z || '0'; n = n + ''; while (n.length < size) { n = z + n; } return n; }