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

# length — String length

LENGTH returns the string length of a value in characters.

### Attributes
| Name | Type | Default | Description |
| ---- | ---- | ------- | ----------- |
| var | var |  | Result variable name |

### Children
- (none)

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

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

### Examples

```xml
<set var="name">iXML</set>
<length var="len">$name</length>

<if value1="$len" func="&gt;" value2="0">
	<output>My name contains more than zero characters!</output>
</if>

<!-- My name contains more than zero characters! -->
```
