# String Length

> Get the length of a string in characters and in bytes.

- ID: `string_length`
- Type: Block
- Category: [Strings](https://inventor.bot/docs/reference/blocks/strings.md)

**Inputs**

| Name | Required | Description | Value |
| --- | --- | --- | --- |
| `text` | yes | String to measure. | e.g. `"hello"` |

**Outputs**

| Name | Description | Value |
| --- | --- | --- |
| `length` | Number of characters. | e.g. `"5"` |
| `byte_length` | Number of bytes (UTF-8). | e.g. `"5"` |

**Example**

```go
stringLength := string_length(Args{text: "hello"})
send_text_message(Args{
	channel_id:      trigger.channel_id,
	message_content: "Length: " + stringLength.length,
})
```