How to pad a string?

I could create the functionality by a Java snippet but I am still interested in knowing whether there is an out-of-the-box solution. I am rather concerned that if such a common transformation is missing, many more are missing and KNIME is not quite up to the task of ETL... sure it is not advertised as being one. My code is (derived from https://stackoverflow.com/questions/13475388/generate-fixed-length-strings-filled-with-whitespaces):

int width = 10;
char padding = '0';

return new String(new char[width - $PID$.length()]).replace('\0', padding) + $PID$;