transmap
Written as transmap(argnum flags):options in a transform expression.
| Minimum arguments | 1 |
| Maximum arguments | no limit |
| Default arguments | 1 |
| Argument modes | MULTIPLE |
Documentation
Section titled “Documentation”Map each of multiple arguments using an nested Transform from options string.
Note: certain limits apply to the nested Transform expression:
- must be one of existing Transform (including TransMapTransform itself), or a transform pipeline (either explicit with
pipelineprefix, or implicit) - must consume a fixed positive number of args (as opposed to ‘any’ number denoted with ‘*’, or zero)
| Flag | Letter |
|---|---|
| spread_input | s |
| spread_output | S |
| noncaptive_input | I |
| arg_num_flexible | f |
Examples
Section titled “Examples”Convert all string args to upper case from multiple args
Section titled “Convert all string args to upper case from multiple args”Input args: ["Hello","World"]Transforms: "transmap(*):cased:upper"Output: ["HELLO","WORLD"]Convert all string args to upper case from a single array arg
Section titled “Convert all string args to upper case from a single array arg”Input args: [["Hello","World"]]Transforms: "transmap(*s):cased:upper"Output: ["HELLO","WORLD"]Explicit nested pipeline transform to convert all args to upper case and add suffix from multiple args
Section titled “Explicit nested pipeline transform to convert all args to upper case and add suffix from multiple args”Input args: ["Hello","World"]Transforms: "transmap(*):pipeline(1):[\"cased:upper\", \"suffix:!\"]"Output: ["HELLO!","WORLD!"]Implicit nested pipeline transform to convert all args to upper case and add suffix from multiple args
Section titled “Implicit nested pipeline transform to convert all args to upper case and add suffix from multiple args”Input args: ["Hello","World"]Transforms: "transmap(*):[\"cased:upper\", \"suffix:!\"]"Output: ["HELLO!","WORLD!"]Recursive/nested transform
Section titled “Recursive/nested transform”Input args: [["Hello","World!"],["Hi","Transform"]]Transforms: "transmap(*):transmap(s):cased:upper"Output: [["HELLO","WORLD!"],["HI","TRANSFORM"]]Get value from each {key}={value} string in args
Section titled “Get value from each {key}={value} string in args”Input args: ["key1=value1","key2=value2"]Transforms: "transmap(*):regex:(?<==).*"Output: ["value1","value2"]