string-length

gweimer/utils/string-length

No description
string-length
@/string-length
STRstring
String to parse
string-length
STR
LEN
LENnumber
To use the node in your project you should have the gweimer/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

node {
    size_t strlen;

    void evaluate(Context ctx) {

        if (isSettingUp() || isInputDirty<input_STR>(ctx)) {
            auto str = getValue<input_STR>(ctx);
            strlen = length(str);
            emitValue<output_LEN>(ctx, strlen);
        }
    }
}