<static> pad(str, len, pad, dir) → {string}
Takes the given string and pads it out, to the length required, using the characterspecified. For example if you need a string to be 6 characters long, you can call: pad('bob', 6, '-', 2) This would return: bob--- as it has padded it out to 6 characters, using the - on the right. You can also use it to pad numbers (they are always returned as strings): pad(512, 6, '0', 1) Would return: 000512 with the string padded to the left. If you don't s