Rellenar texto
text-padRellena texto hasta un ancho dado a la izquierda, derecha o ambos lados. Cuándo: hay que transformar, comparar o medir un texto con exactitud y no por aproximación. No para: acortar un texto a una longitud máxima (text-truncate). Efectos secundarios: ninguno (solo lectura, sin red, sin estado guardado). Determinista: la misma entrada da la misma salida. Límites: entrada JSON de hasta 64 KB, 1 s por llamada, resultado de hasta 1 MB.
EN: Pads text to a target width in graphemes on the left, right or both sides with a fill string. When: text has to be transformed, compared or measured exactly instead of approximated. Not for: shortening text to a maximum length (text-truncate). Side effects: none (read-only, no network access, no stored state). Deterministic: the same input gives the same output. Limits: JSON input up to 64 KB, 1 s per call, result up to 1 MB.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fill | No | Fill (string; optional; default " "; at least 1 chars; up to 8 chars). | |
| side | No | Side (optional; one of: left, right, both; default "left"). | left |
| text | Yes | Text (string; required; up to 4096 chars). | |
| width | Yes | Target width (integer; required; min 0; max 10000). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | No |