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

# RPad

The **RPad** function makes a string a desired length by either adding or removing characters at the end of the string. If the string is too long, the string will be truncated by removing characters. If the string is too short, the string will be padded by adding fill characters.

It's useful for standardizing the length of strings as inputs for other text functions dependent on length, such as **Mid**. It's also useful for standardizing text to be more readable.

## Usage

```
RPad (text, length, [fill])
```

**text** (required)- The string to pad to the desired length.

**length** (required)- The length of the returned string.

**fill** (optional)- The fill character with which to pad strings shorter than the length. Defaults to space.

## Example

```
RPad("sigma", 10, "-")
```

* Returns: "sigma-----"

```
Rpad("Sigma Computing", 10)
```

* Returns: "Sigma Comp"

```
[Full Name Standard] = Concat(RPad([First Name], 15, " "), RPad([Last Name], 10))
[Initials] = Concat(Mid([Full Name Standard], 1, 1), Mid([Full Name Standard], 16, 1))
```

* Returns:

![](https://files.buildwithfern.com/sigma.docs.buildwithfern.com/4699c25cab98fa0b9323f084de9ac0a3b01712683204feaf668c31a977754e57/assets/docs-images/c351e11-mceclip0_2.png)

## Related resources

* [LPad](/docs/lpad)