Files
1hew-ComfyUI-1hewNodes/web/docs/1hew_ListCustomString/zh.md
T
2025-11-18 18:35:12 +08:00

33 lines
1.3 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# List Custom String - 自定义字符串列表
**节点功能:** `List Custom String` 将多行文本解析为字符串列表,并同时输出列表及其长度。支持破折线分段模式与多分隔符的 CSV 风格解析,并处理项级引号。
## 输入
| 参数名称 | 入端选择 | 数据类型 | 默认值 | 取值范围 | 描述 |
| -------- | -------- | -------- | ------ | -------- | ---- |
| `custom_text` | - | STRING | `` | - | 待解析的多行文本。 |
## 输出
| 输出名称 | 数据类型 | 描述 |
|---------|----------|------|
| `string_list` | LIST | 解析得到的字符串列表(列表型输出端)。 |
| `count` | INT | `string_list` 的长度。 |
## 功能说明
- 破折线分段:仅由破折线组成的行划分段落;每段会去除引号后作为字符串加入列表。
- CSV 解析:支持 `,`、`;`、`,`、`;` 等分隔符;逐项去除引号。
- 稳健缺省:空输入返回 `["default"]`。
- 核心逻辑:破折线检测;分段解析;CSV 解析。
## 典型用法
- CSV 输入:在一行或多行写入 `apple, banana, cherry`。
- 分段模式:用由破折线组成的分隔行表示独立字符串项,项可带引号。
## 注意与建议
- 项目外层引号在加入列表前会被移除。
- 当不存在有效字符串项时将返回 `["default"]`。