concat

xod/core/concat

Concatenates (adds together) strings
concat
@/concat
Concatenates (adds together) strings
IN1string
IN2string (variadic)
concat
IN1
IN2
OUT
OUTstring

C++ implementation

#pragma XOD dirtieness disable

node {
    ConcatListView<char> view;

    void evaluate(Context ctx) {
        auto head = getValue<input_IN1>(ctx);
        auto tail = getValue<input_IN2>(ctx);
        view = ConcatListView<char>(head, tail);
        emitValue<output_OUT>(ctx, XString(&view));
    }
}

Tabular tests

IN1IN2OUT
"""Yay""Yay"
"Woo""""Woo"
"123""456""123456"
"Hello, ""World""Hello, World"
"I said \"Hello\" ""to him""I said \"Hello\" to him"