> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.itential.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.itential.com/_mcp/server.

# padEnd

> Reference for the padEnd workflow task, which pads the end of a string with another string until the result reaches a specified length.

The `padEnd` task pads the end of a string with another string (repeated if needed) so that the resulting string reaches a specified length. The padding is applied from the right end of the given string.

## Potential use case

Use this task when you have a dataset of a known length and want to repeat a value at the end of the current dataset. You can use `padEnd` to specify the target length and the string to append.

## Properties

| Incoming       | Type   | Description                                                                                                                                                       |
| -------------- | ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `str`          | String | Required. The string to pad.                                                                                                                                      |
| `targetLength` | Number | Required. The desired length of the resulting string after padding. If the value is less than the length of `str`, the task returns the original `str` unchanged. |
| `padString`    | String | Required. The string to use for padding. If it is too long to fit within `targetLength`, it is truncated.                                                         |

| Outgoing       | Type   | Description                                |
| -------------- | ------ | ------------------------------------------ |
| `paddedString` | String | The padded string of the specified length. |

## Example

* The `str` variable is set to `"Hello World"` (length: 11 characters). The `targetLength` is set to `14`.
* The `padString` is `"!"`.

![](/_fern-img/533bdaeb455a5b179d6770be02d8dac319bddcc731e1b2e383a16043d13b6e06.webp)

The result is `"Hello World!!!"` — three exclamation marks are appended to reach the specified `targetLength` of 14.

![](/_fern-img/823b86e5c8071288c5c80dd43633a1361d6fca36cda08bb6f2f1ef22c4d60712.webp)