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

# StringTrim - ComfyUI Built-in Node Documentation

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

StringTrim 节点用于移除文本字符串开头、结尾或两端的空白字符。您可以选择从字符串的左侧、右侧或两侧进行修剪。此功能有助于清理文本输入，去除多余的空格、制表符或换行符。

## 输入

| 参数    | 描述                                                                 | 数据类型   | 是否必填 | 范围                              |
| ----- | ------------------------------------------------------------------ | ------ | ---- | ------------------------------- |
| `字符串` | 要处理的文本字符串。支持多行输入。                                                  | STRING | 是    | -                               |
| `模式`  | 指定修剪字符串的哪一侧。"Both" 移除两端的空白字符，"Left" 仅移除开头的空白字符，"Right" 仅移除结尾的空白字符。 | COMBO  | 是    | "Both"<br />"Left"<br />"Right" |

## 输出

| 输出名称     | 描述                     | 数据类型   |
| -------- | ---------------------- | ------ |
| `output` | 根据所选模式移除空白字符后的修剪文本字符串。 | STRING |

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

***

**Source fingerprint (SHA-256):** `29b4da100373585af8a672ccfbd4c0b597705c1d8c176b2f88f3e878c1192460`
