Skip to end of metadata
Go to start of metadata

This service takes the input non-negative integer and returns a string containing it padded to the specified target length. The target length defaults to 7. If the input is already longer than the target length then it is not altered. For example, the input '12' with the default target length will yield '0000012'. The input '12' with target length '4' will yield '0012'. With target length '1' it yields '12'.

Input ports

  • input - A string containing the non-negative number to be padded. This is a mandatory parameter.
  • targetlength - A string containing the strictly positive integer target length for the result. This is an optional parameter. It defaults to '7'.

Output ports

  • padded - A string containing the input non-negative integer padded to the specified target length, or the original integer if it is longer than the target length.

Examples

Example workflows can be found on myExperiment showing:

Labels
  • None