NGs String - String Tool
Quick case, trim, and padding transforms for text
- STRING
A grab-bag utility for the small text-formatting jobs that come up constantly and aren't worth a dedicated node each - normalizing case, trimming stray whitespace, tidying spacing. One node, one dropdown, seven behaviors. The README's own description keeps it vague on purpose: "A comprehensive string-operation tool for various UI scenarios."
How it works
string goes in, mode picks the transform, a single STRING comes out. Going by the mode names - the README doesn't spell out the exact behavior of each one, so this is the reasonable read on the naming, not a confirmed spec:
- Condense - most likely collapses repeated whitespace or blank lines down to something tighter, the same kind of cleanup this pack's String Cutter does at a smaller scale with its
cleanflag. - Trim - strips leading/trailing whitespace.
- Padding(<) / Padding(-) / Padding(>) - pad the string out to a fixed width; the arrows in the names suggest left-, center-, and right-alignment respectively.
- Lower / Upper - straightforward full lowercase or full uppercase conversion.
The inputs and outputs that matter
string- default empty, the text to transform.mode- enum, defaultCondense, seven choices as above.
Output is a single STRING.
This kind of node exists because case and whitespace bugs are disproportionately annoying relative to how simple they sound. A trailing space in a tag string can break an exact-match lookup somewhere downstream; inconsistent case in a set of trigger words can mean a LoRA's keyword silently doesn't match what you typed. Rather than remembering to .strip().lower() your way through a dozen different text nodes, having one small utility with a mode dropdown means the fix is always the same node, in the same place, however you got the messy string in the first place.
How to install it
ComfyUI Manager: search "NeoGriever," install, restart. Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/NeoGriever/ComfyUI-NeoGriever
then restart. No dependencies to install alongside it.
Common issues & troubleshooting
Padding mode doesn't align the way you expected. Because the README's blurb for this node doesn't actually explain what each of the seven modes does, the fastest way to learn the difference between Padding(<), Padding(-), and Padding(>) is to run a short test string through all three and compare the output directly - that'll tell you more than guessing from the arrow symbols. This is one of the less self-documented nodes in the pack; if you figure out the padding character and target width it uses, that's worth noting for next time, since it isn't visible from the schema alone.
Expected a length or padding-character input. There isn't one in the schema - the padding modes take only string as input, so whatever width and fill character they pad to is presumably fixed internally rather than configurable from the graph.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| string | STRING | — | |
| mode | COMBO | Condense | 7 options: Condense, Trim, Padding(<), Padding(-), Padding(>), Lower, +1 |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | — |