Formatted string by pattern
What this tool does
This tool takes a piece of text and a formatting pattern to create a new string. For example, you can use it to add zeros to the start of a number so it has a specific length.
The formatting is done strictly by the tool itself using the rules in the pattern. It does not check if the text is real or valid against any external list.
Common uses
- Adding leading zeros to numbers, like turning '5' into '000005'.
- Padding text to a fixed width.
Input data
| Parameter | Required | Example | Description |
|---|---|---|---|
text | Yes | 1122 | The plain text or number to format (required). Example: '1122' |
format | Yes | %09d | The pattern that describes how to format the text (required). Example: '%09d' |
Output data
| Field | Description |
|---|---|
result | The final formatted string. Example: '000001122' |