---
title: "pad — Pad"
description: "iXML command pad: Pad."
canonical_url: "https://www.zeyos.com/ixml/ref/pad"
markdown_url: "https://www.zeyos.com/ai/guide/ixml/ref/pad.md"
section: "ixml-reference"
authority: "reference"
language: "en"
source_repository: "https://cloud.zeyos.com/__doc/ixmldoc.xml"
source_sha256: "a23f04e6a98628ca3c273c3b8dd2c33c034cfda3e0f00478d8793074fd2f70dd"
---

# pad — Pad

PAD pads a value to a given length.

If the length is positive then the value is padded on the right, if it is negative then on the left. If the padding value is empty or the absolute length is less than or equal to the actual length of the value then no padding takes place.

### Attributes
| Name | Type | Default | Description |
| ---- | ---- | ------- | ----------- |
| var | var |  | Result variable name |
| length | int |  | Length |
| padding | string | (space) | Padding value |
| type | type | chars | Measurement type |

#### Possible values
Possible values for `type`:
- chars — By characters
- bytes — By bytes


### Children
- (none)

### Parents
- (not restricted in the reference)

### Result
- binding: var; type: string

### Examples

```xml
<output>
	<pad length="-10" padding="0">123</pad>
</output>

<!-- 0000000123 -->
```
