string-to-int

bradzilla84/bradzilla84-utilities/string-to-int

Convert a number stored in a string to a Int Number
string-to-int
@/string-to-int
Convert a number stored in a string to a Int Number
INstring
Input Number as a String
string-to-int
OUT
IN
OUTnumber
Output Numer as INT
To use the node in your project you should have the bradzilla84/bradzilla84-utilities 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) {
    char TXTC[16] = { 0 };
    auto inValue = getValue<input_IN>(ctx);
    dump(inValue, TXTC);
    emitValue<output_OUT>(ctx, atoi(TXTC));
}