string-equal

nkrkv/my-utils/string-equal

Checks whether two input strings are equal.
string-equal
@/string-equal
Checks whether two input strings are equal.
IN1string
IN2string
string-equal
IN1
IN2
OUT
OUTboolean
To use the node in your project you should have the nkrkv/my-utils 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

struct State {
};

{{ GENERATED_CODE }}

void evaluate(Context ctx) {
    auto s1 = getValue<input_IN1>(ctx);
    auto s2 = getValue<input_IN2>(ctx);
    auto it1 = s1.iterate();
    auto it2 = s2.iterate();
    while (it1 && it2 && *it1 == *it2) {
        ++it1;
        ++it2;
    }

    bool comparisonPastTheEnd = !it1 && !it2;
    emitValue<output_OUT>(ctx, comparisonPastTheEnd);
}