string-to-number

wayland/433mhz-rf-module/string-to-number

Convert string to number
string-to-number
@/string-to-number
Convert string to number
STRstring
String
string-to-number
STR
NUM
NUMnumber
Number
To use the node in your project you should have the wayland/433mhz-rf-module 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 state = getState(ctx);
    auto xString = getValue<input_STR>(ctx);

    int N=length(xString) + 1;
    char cString[N];
    for(int i=0;i<N;i++)
    cString[i]=0;
    dump(xString,cString);
    emitValue<output_NUM>(ctx, atof(cString));
}