> 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.

# LPad

Prepends a pattern to or truncates a string to the desired length.

## Usage

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

**text** (required)- The string, or column of strings, to pad or trim to the desired length.

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

**fill** (optional)- The character with which to pad the text. Defaults to space.

## Example

```
LPad([Product Family], 4)
```

* Returns the Product Family column trimmed to a length of 4

![](https://files.buildwithfern.com/sigma.docs.buildwithfern.com/0a46a31f7459b921130f0b170aec9de4512f01698c853ff1362acf94e3f218df/assets/docs-images/17b2570-mceclip0_2.png)

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

* Returns "-----sigma"

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

* Returns "Sigma Comp"

## Related resources

* [RPad](/docs/rpad)