showing results for - "strpad jquery"
Sami
15 Jan 2019
1function pad (str, max) {
2  str = str.toString();
3  return str.length < max ? pad("0" + str, max) : str;
4}
5
6pad("3", 3);    // => "003"
7pad("123", 5);  // => "00123"
8pad("1234", 2); // => "1234"
queries leading to this page
strpad jquery strpad jquery