> ## Documentation Index
> Fetch the complete documentation index at: https://docs.metrics-man.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Length

# \$length

The `$length` operator returns the length of a string.

## Input

* A single string value

## Output

* The number of characters in the input string

## Examples

### Basic Length

```json theme={null}
{
  "$length": [
    "Hello, World!"
  ]
}
```

Result: `13`

### Empty String

```json theme={null}
{
  "$length": [
    ""
  ]
}
```

Result: `0`

### Field Value

```json theme={null}
{
  "$length": [
    {
      "$input": "message"
    }
  ]
}
```

Result: The length of the message field
