add_padding function to add padding to a given string