Pads the both ends of a string w/ repeated spaces|substrings
string
(string): input string[length=0]
(number): length of the padded portion[substr=' ']
(string): substring to apply
(string): the input padded w/ spaces|substrings
// if no `substr` is provided, it pads the string w/ spaces
const result = strings.pad('xyzxyz', 9);
console.log(result);
> ' xyzxyz '