> ## Documentation Index
> Fetch the complete documentation index at: https://dripart-docs-recommend-assets-api.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# StringLength - ComfyUI Built-in Node Documentation

> Complete documentation for the StringLength node in ComfyUI. Learn its inputs, outputs, parameters and usage.

> 本文档由 AI 生成。如果您发现任何错误或有改进建议，欢迎贡献！ [在 GitHub 上编辑](https://github.com/Comfy-Org/embedded-docs/blob/main/comfyui_embedded_docs/docs/StringLength/zh.md)

## 概述

StringLength 节点用于计算文本字符串中的字符数量。它接收任意文本输入并返回字符总数，包括空格和标点符号。此功能适用于测量文本长度或验证字符串大小要求。

## 输入

| 参数       | 数据类型   | 必需 | 范围  | 描述                   |
| -------- | ------ | -- | --- | -------------------- |
| `string` | STRING | 是  | 无限制 | 需要测量长度的文本字符串。支持多行输入。 |

## 输出

| 输出名称     | 数据类型 | 描述                     |
| -------- | ---- | ---------------------- |
| `length` | INT  | 输入字符串中的字符总数，包括空格和特殊字符。 |
