This snippet will give you the pad functions (padRight, padLeft) for javascript.
Sample Javascript
String.prototype.padLeft = function(length, character) { var text = this.valueOf(); var character = character || " "; while (text.length<length) { text = character + text; } return text; }; String.prototype.padRight = function(length, character) { var text = this.valueOf(); var character = character || " "; while (text.length<length) { text = text + character; } return text; };
RT @CodeSnippetsNET: Pad functions for #Javascript http://t.co/aSD1pl2mEE #js #html #php #css #code #dev #programming
RT @CodeSnippetsNET: Pad functions for #Javascript http://t.co/aSD1pl2mEE #js #html #php #css #code #dev #programming