concat

Concatenate strings.

Description

  • Concatenate strings.

  • list of string can be passed.

Parameters

Parameter

Type

Required

Default

Comment

first

str|list[str]

Yes

-

string or list of strings to be concatnate before second parameter

out_bb

bool

No

False

out_field

str

No

None

second

str|list[str]

Yes

-

string or list of strings to be concatnate after first parameter

Examples

# Concatenate the 2 strings.
# Output: {'concat': 'head1:pv1'}
- concat:
    name: "concat"
    first: "head1:"
    second: "pv1"

# Concatenate the 1 string and 1 list of string.
# Output: {'concat': ['head1:pv1', 'head1:pv2']}
- concat:
    name: "concat"
    first: "head1:"
    second: ["pv1", "pv2"]

# Concatenate the 2 list of string.
# Output: {'concat': ['head1:pv1', 'head2:pv2']}
- concat:
    name: "concat"
    first: ["head1:", "head2:"]
    second: ["pv1", "pv2"]

# Concatenate the 2 list of string, but length is different.
# Output: {'concat': ['head1:pv1', 'head2:pv2']}
- concat:
    name: "concat"
    first: ["head1:", "head2:", "head3:"]
    second: ["pv1", "pv2"]

# Concatenate the 2 strings and output to the blackboard.
# Output: {'foo': 'head1:pv1'}
- concat:
    name: "concat"
    first: "head1:"
    second: "pv1"
    out_bb: yes
    out_field: "foo"