FORMAT A STRING OR A NUMBER¶
Formats a scalar value (string or number) using a C-style sprintf format string. Use it to control decimal places, zero-padding, or to embed a value into a fixed text template.
When to use¶
Classification: process.
Tagged: format, number, printf, scalar, sprintf, string, template.
Inputs¶
| Label | ID | Type | Default | Required | Description |
|---|---|---|---|---|---|
| Value To Be Formatted | valuetobeformatted | scalar | — | ✓ | The scalar value (string or number) to be formatted; passed as the single argument to sprintf. |
| Format | format | string | %s | A C-style sprintf format string (e.g. ‘%.2f’ for two decimal places, ‘%05d’ for zero-padded integer, ‘%s’ for plain string passthrough); defaults to ‘%s’. |
Outputs¶
| Label | ID | Type | Description |
|---|---|---|---|
| string_sprintf_output_1 | string_sprintf_output_1 | scalar | The resulting formatted string produced by applying the format template to the input value. |
Disciplines¶
- data.dataset.transform
Runnable example¶
A runnable example is registered for this worker. Open the example workflow on the d3VIEW canvas: /api/workflow/example?id=string_sprintf
Auto-generated from transformation schema. Worker id: string_sprintf. Schema hash: 83988b3c568f. Hand-curated docs in workerexamples/ override this page when present.