String
This node stores and manages a text string.
The String node holds a text value that can be updated, read, and monitored for changes.
The String node is a variable container for text data. It stores a string value and provides mechanisms to update it either immediately or upon a signal trigger. It also provides the length of the string as a convenient output.
Inputs
General
| Data | Description |
|---|---|
| Value | The text string to store. Default: "" (empty string). |
Actions
| Signal | Description |
|---|---|
| Set | Triggers the update of the stored value. If connected, the Value input is buffered until this signal is received. |
Outputs
Data
| Data | Description |
|---|---|
| Value | The currently stored string value. |
| Length | The number of characters in the stored string. |
Signals
| Signal | Description |
|---|---|
| Changed | Triggered whenever the stored value changes (i.e., new value is different from old value). |
| Stored | Triggered when the Set action is completed, regardless of whether the value changed. |
Usage
Use the String node to store text states, user inputs, or configuration values.
Modes of Operation
- Direct Update (Default):
- Leave the Set input disconnected.
- Any change to the Value input immediately updates the stored value and triggers the Changed signal.
- Explicit Update (Buffered):
- Connect a signal to the Set input.
- Changes to the Value input are "buffered" internally.
- The stored value only updates (and outputs change) when the Set signal is triggered.
Example Use Cases
- User Name: Store a user's name and display it in multiple places.
- Input Buffering: Connect a Text Input field to Value and a "Submit" button to Set. The String node will only update when the button is clicked.
- Character Count: Use the Length output to validate input size (e.g., "Password must be at least 8 characters").
Detailed Behavior
- Type Casting: Any input provided to Value is automatically converted to a string (e.g.,
123becomes"123"). - Change Detection: The Changed signal only fires if the new value is strictly different from the current value.
- Stored Signal: The Stored signal fires every time Set is triggered, even if the value remains the same.
Troubleshooting
- Value Not Updating: If you have connected a wire to the Set input, the node enters "Explicit Update" mode. You must trigger the Set signal for the value to update.