append

nickprogramm/lightsyntax/append

No description
append
@/append
string1string
string2string (variadic)
append
OUT
string1
string2
OUTstring
To use the node in your project you should have the nickprogramm/lightsyntax library installed. Use the “File → Add Library” menu item in XOD IDE if you don’t have it yet. See Using libraries for more info.

C++ implementation

#pragma XOD dirtieness disable

struct State {
    ConcatListView<char> view;
};

{{ GENERATED_CODE }}

void evaluate(Context ctx) {
    auto state = getState(ctx);
    auto head = getValue<input_IN1>(ctx);
    auto tail = getValue<input_IN2>(ctx);
    state->view = ConcatListView<char>(head, tail);
    emitValue<output_OUT>(ctx, XString(&state->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"