Guest User

Untitled

a guest
Feb 21st, 2018
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.18 KB | None | 0 0
  1. String.prototype.toFormatString = function(place) {
  2. place = place || 2;
  3. var str = this.toString();
  4. var n = str.split('.')[0].length;
  5. while (n++ < place) str = '0'+str;
  6. return str;
  7. };
Add Comment
Please, Sign In to add comment