Dividir texto y tomar una parte
text-split-pickDivide un texto por un delimitador (texto literal, salto de línea o tabulador) y devuelve todas las partes, la primera, la última o la n-ésima, con recorte y descarte de vacías opcionales. Cuándo: hay que transformar, comparar o medir un texto con exactitud y no por aproximación. No para: conservar o quitar líneas enteras que contienen una subcadena (lines-filter). 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: Splits text on a delimiter (literal text, or newline / tab) and returns all parts, the first, the last or the n-th (1-based; negative counts from the end), optionally trimming parts and dropping empty ones. When: text has to be transformed, compared or measured exactly instead of approximated. Not for: keeping or dropping whole lines that contain a substring (lines-filter). [EN completo / full EN: inputSchema.description]
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| n | No | Position for pick "nth" (1-based; -1 is the last) (integer; optional; min -100000; max 100000). | |
| pick | No | Which part(s) (optional; one of: all, first, last, nth; default "all"). | all |
| text | Yes | Text (string; required). | |
| trim | No | Trim whitespace around parts (boolean; optional; default true). | |
| delimiter | No | Delimiter; "\n"/"newline" and "\t"/"tab" are special (string; optional; default ","; at least 1 chars; up to 100 chars). | , |
| max_parts | No | Stop after this many parts (integer; optional; default 10000; min 1; max 100000). | |
| remove_empty | No | Drop empty parts (boolean; optional; default false). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| count | No | ||
| index | No | ||
| parts | No | ||
| value | No | any JSON value | |
| truncated | No |